Skip to content

Commit

Permalink
fix: call component dispose in resize manager to fix leak (#5369)
Browse files Browse the repository at this point in the history
Because we add Touch Activity in the parent class and those don't actually get removed in Resize Manager we leak on every dispose. Calling super.dispose() cleans them up because we remove our list of handlers via a call to DomData.removeData

Fixes #5339
  • Loading branch information
brandonocasey authored and gkatsev committed Aug 10, 2018
1 parent db4b894 commit 6f072d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/js/resize-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ class ResizeManager extends Component {
}

// Only create an element when ResizeObserver isn't available
const options_ = mergeOptions({createEl: !RESIZE_OBSERVER_AVAILABLE}, options);
const options_ = mergeOptions({
createEl: !RESIZE_OBSERVER_AVAILABLE,
reportTouchActivity: false
}, options);

super(player, options_);

Expand Down Expand Up @@ -115,6 +118,7 @@ class ResizeManager extends Component {
this.resizeObserver = null;
this.debouncedHandler_ = null;
this.loadListener_ = null;
super.dispose();
}

}
Expand Down

0 comments on commit 6f072d8

Please sign in to comment.