hyperhype / hyperscript

Create HyperText with JavaScript.
MIT License
2.64k stars 109 forks source link

Must manually call cleanup or elements with event handlers will leak #99

Open aaronyo opened 3 years ago

aaronyo commented 3 years ago

Looks like any element created with an event handler in its props is not going to get gc'd unless you manually call "cleanup." The "cleanupFuncs" array has references in the closures it holds.

This was surprising. Does anyone think this feature is worth it -- having to manually cleanup any dom node with an event handler?