FWIW, this will count the number of listeners that are listening to the element. Which I believe drops to zero as soon as the element is removed, hence the passing test.

The harder problem is ensuring that if the ContentView was listening to other things, like subviews or other eventemitters, that those are destroyed when the ContentView is destroyed.

We can leave that until later as a future optimization, just pointing out the difference. May be useful to leave a comment when defining this method to clarify.