Teact: Fix DOM nodes leak
This commit is contained in:
parent
977b0903fa
commit
29d2ec0416
@ -377,7 +377,7 @@ function unmountComponent(componentInstance: ComponentInstance) {
|
|||||||
helpGc(componentInstance);
|
helpGc(componentInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We force cleaning as many objects as possible. Not sure this is needed at all.
|
// We need to remove all references to DOM objects. We also clean all other references, just in case.
|
||||||
function helpGc(componentInstance: ComponentInstance) {
|
function helpGc(componentInstance: ComponentInstance) {
|
||||||
/* eslint-disable no-null/no-null */
|
/* eslint-disable no-null/no-null */
|
||||||
|
|
||||||
@ -399,6 +399,7 @@ function helpGc(componentInstance: ComponentInstance) {
|
|||||||
|
|
||||||
componentInstance.hooks = null as any;
|
componentInstance.hooks = null as any;
|
||||||
componentInstance.$element = null as any;
|
componentInstance.$element = null as any;
|
||||||
|
componentInstance.renderedValue = null as any;
|
||||||
componentInstance.Component = null as any;
|
componentInstance.Component = null as any;
|
||||||
componentInstance.props = null as any;
|
componentInstance.props = null as any;
|
||||||
componentInstance.forceUpdate = null as any;
|
componentInstance.forceUpdate = null as any;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user