Closed GlennGeenen closed 6 years ago
Hi, I believe you should call uninstall
rather. The removeAllListeners
still keeps the detection system of the element for fast listener attachments in the future. This will retain memory.
Let's reopen the issue if it doesn't solve the issue for you :)
Brilliant! Thanks for this insight @wnr 👍
Oh, and huge love to you again for this amazing library 😘
Thanks ❤️
The react-sizeme component uses this package. It creates a resizeDetector singleton. The problem that we experience is that the resizeDetector retains memory (both dom elements and listeners). The component calls removeAllListeners in componentWillUnmount what seems like the correct approach.
I have create an issue in react-sizeme with a solution (https://github.com/ctrlplusb/react-sizeme/issues/131) but I'm not convinced the issue is within the react-sizeme package.