A watermark: the id the next registered listener will get. Ids only grow, so the listeners registered from here on are exactly those removeSince releases.
The watermark, to hand to removeSince.
Releases every listener registered since mark — and only those: what was registered
before stays. This is how a boot releases its own listeners without taking down what a
host registered on the same manager before it.
A watermark taken by mark.
How many listeners were released.
Tracks bound listeners so a module can release all of them at once.
The point is teardown:
removeEventListenerneeds the exact(event, handler, options)triple used at bind time, and keeping that bookkeeping at each call site is where leaks come from. Register through this andremoveAll()is enough.