The module exports the function onDestroy. It takes an object to watch and a function that should be called some time after the object's destruction. When exactly it is called cannot be relied on, ...