Fix emitter handler leak in ThreadView (#10803)

* Fix emitter handler leak in ThreadView

* Help gc react stateNodes
This commit is contained in:
Michael Telatynski 2023-05-05 16:05:58 +01:00 committed by GitHub
parent c7ed23e972
commit 499d8110b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 11 deletions

View file

@ -294,6 +294,9 @@ export default class TextualBody extends React.Component<IBodyProps, IState> {
this.unmounted = true;
unmountPills(this.pills);
unmountTooltips(this.tooltips);
this.pills = [];
this.tooltips = [];
}
public shouldComponentUpdate(nextProps: Readonly<IBodyProps>, nextState: Readonly<IState>): boolean {