It seems that the NSGetFactory for the OJI DLL maintains a reference to the service manager (http://lxr.mozilla.org/seamonkey/source/modules/oji/src/nsCJVMManagerFactory.cp p#112) but never releases it. The resulting service manager leak results in many more downstream leaks.
*** Bug 8178 has been marked as a duplicate of this bug. ***
Hmm... I don't understand why we need to cache a global reference to the service manager. It is only used in one method, NSGetFactory().
Actually, it's used in other files in the same module (see JVM_GetJVMMgr(), for example).
How do I obtain a reference to the ServiceManager on demand? There is no case when I can release it so I could implement a strategy where I just re-obtain and release it every time I need to use it. Can I just save the nsIServiceManager reference I receive from NSGetFactory()?
Instead of asking for the ServiceManager and invoking methods from it, why can't I just use nsServiceManeger static methods, as is done in all the files returned in the query http://lxr.mozilla.org/mozilla/search?string=ServiceManager Ed
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
Warren beat me to the punch.
You need to log in before you can comment on or make changes to this bug.