EventEmitter memory leak
Closed this issue · 3 comments
dannav commented
In componentWillUnmount() event listeners that were placed on the store in componentDidMount() were not removed.
componentDidMount() {
Store.on(Constants.SHOW, this.bound.onShow);
Store.on(Constants.CLOSE, this.bound.onClose);
Store.on(Constants.REFRESH, this.bound.onRefresh);
}
componentWillUnmount() {
// need to remove Store event listeners
key.deleteScope('react-popup');
key.filter = defaultKeyFilter;
}
tbleckert commented
Ah, thanks! Will make sure it's added in the next release
quannt commented
I want to help on this. @tbleckert