Fix memory leaks (#1054)

This commit is contained in:
Jake Archibald
2021-06-15 10:45:53 +01:00
committed by GitHub
parent 5595525c8a
commit 828f9a5eeb
2 changed files with 23 additions and 11 deletions

View File

@@ -377,6 +377,7 @@ export default class Compress extends Component<Props, State> {
componentWillUnmount(): void {
updateDocumentTitle({ loading: false });
this.widthQuery.removeListener(this.onMobileWidthChange);
this.mainAbortController.abort();
for (const controller of this.sideAbortControllers) {
controller.abort();