dataarts / dat.gui

Lightweight controller library for JavaScript.
Apache License 2.0
7.46k stars 1.08k forks source link

dat.GUI destroy() does not remove window resize listener #299

Open yokotsumo opened 3 years ago

yokotsumo commented 3 years ago

I have to destroy and recreate the dat.GUI to change text language. I use the destroy() method. When I look at the chrome dev tools, the number of window.'resize' listeners from dat.GUI doubles each time and the memory usage increases. I can not find a way to avoid this or destroy the listeners.