mozilla/addon-sdk — pull request #344 by ochameau (2012-02-14 18:34:39+00:00)
Title: Bug 724404 - require("widget") creates zombie compartments

This time, the leak lives in addon-kit/windows:
`_onUnload` is not called on addon disabling and if `onUntrack` may lead to calls to `unload.when` that will be ignored during addon disabling, as we do not care about unload listener set during the unload event itself.

I had hard time figuring out what was exactly leaking,
you should have a good picture of it with comments in code.
But do not hesitate to suggest other ways to clean listeners/references,
as it ends up being quite hard to find a working solution.