Closed cyril-sf closed 5 years ago
My 2nd mistake was to believe that the CPs were cached after being computed. It turns out that we use volatile
quite a bit, making cacheFor
irrelevant.
I'll simply use a flag when adding the event listeners.
@kpfefferle I updated the description. Merging.
When removing memory leaks in #231, I assumed that the CPs that were used to attach event handlers were always computed. It turns out it's not the case. In this PR a flag is used to track when an event listener is added, then that same flag is checked to determine if teardown is required.