mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-20 21:42:29 +00:00
[fix] Avoid retaining DOM nodes in Touchable
Explicitly clear the DOM nodes to prevent memory leaks. Fix #2039 Close #2047
This commit is contained in:
committed by
Nicolas Gallagher
parent
5b7b974224
commit
968b3e90a1
@@ -393,6 +393,10 @@ const TouchableMixin = {
|
||||
this.touchableDelayTimeout && clearTimeout(this.touchableDelayTimeout);
|
||||
this.longPressDelayTimeout && clearTimeout(this.longPressDelayTimeout);
|
||||
this.pressOutDelayTimeout && clearTimeout(this.pressOutDelayTimeout);
|
||||
// Clear DOM nodes
|
||||
this.pressInLocation = null;
|
||||
this.state.touchable.responderID = null;
|
||||
this._touchableNode = null;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user