mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-26 20:34:44 +01:00
Teact: Fix DOM nodes leak
This commit is contained in:
parent
977b0903fa
commit
29d2ec0416
@ -377,7 +377,7 @@ function unmountComponent(componentInstance: 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) {
|
||||
/* eslint-disable no-null/no-null */
|
||||
|
||||
@ -399,6 +399,7 @@ function helpGc(componentInstance: ComponentInstance) {
|
||||
|
||||
componentInstance.hooks = null as any;
|
||||
componentInstance.$element = null as any;
|
||||
componentInstance.renderedValue = null as any;
|
||||
componentInstance.Component = null as any;
|
||||
componentInstance.props = null as any;
|
||||
componentInstance.forceUpdate = null as any;
|
||||
|
Loading…
Reference in New Issue
Block a user