If you are observing several topics it's easy to forget to add a Remove call when adding new observer topic. If you instead write an array of topics and iterate over that it's impossible to screw up (e.g. https://hg.mozilla.org/mozilla-central/rev/3a8fe7c942e3). We've seen a couple of leaks caused by forgetting to remove all observers (e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=968536#c0).
- Kyle _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform