nsIScriptContext memory management
mhammond at skippinet.com.au
Wed, 23 Nov 2005 10:57:17 +1100
As discussed at the Content team meeting and its minutes, I have been
looking at the memory management for nsIScriptContext.
I have written this up at
http://wiki.mozilla.org/Memory_Management_for_nsIScriptContext. A summary
* Brendan decided on a "Drop/Hold" model.
* Manually doing Drop/Hold operations is very error prone, especially with
respect to "early returns". Leaks here can be nasty.
* A clean technique to automate this isn't particularly obvious to me. I
outline one such implementation, but also discuss its drawbacks.
As I mention in that document, I have an implementation but request feedback
before continuing further.