Memory leaks fixing effort

Viewer

Component Leaks fixing by... Status (nsIModule conversion)
bin/Components/
caps.dll rjc
chardet.dll kipp DONE
history.dll dp DONE (waiting to checkin)
jsloader.dll kipp DONE
lwbrk.dll kipp DONE
necko.dll kipp DONE
necko_resource.dll kipp DONE
necko_file.dll kipp DONE
nsgif.dll kipp DONE
nslocale.dll cata
mimetype.dll rjc
oji.dll rjc
profile.dll dp
raptorhtml.dll kipp DONE
raptorview.dll dp DONE (doesnt cache factory)
rdf.dll kipp DONE
uconv.dll cata
ucvlatin.dll cata
ucharuti.dll cata
xpc3250.dll kipp DONE
xppref32.dll dp DONE (waiting to checkin)
bin/
jsdom.dll
raptorhtmlpars.dll vidur
raptorgfxwin.dll
raptorweb.dll
raptorplugin.dll
raptorwidget.dll

Apprunner only

 
Component Leaks fixing by... Status (nsIModule conversion)
addrbook.dll mscott
bookmarks.dll
brprof.dll
chrome.dll
cnvts.dll
cookie.dll neeti
directory.dll
emitter.dll
ender.dll
eventloop.dll
intlcmpt.dll
jar50.dll
jsurl.dll
mime.dll mscott
mork.dll mscott
mozbrwsr.dll
mozfind.dll
mozucth.dll
mozxfer.dll
msgbase.dll
msgcompo.dll
msgdb.dll
msgimap.dll
msglocal.dll
msgnews.dll
nativeapp.dll
necko_about.dll kipp
necko_data.dll kipp
necko_ftp.dll kipp
necko_http.dll kipp
nsjpg.dll kipp DONE
nspng.dll kipp DONE
nsprefm.dll
nsxpi.dll
pics.dll neeti
prefwind.dll
rdfdomds.dll
regviewer.dll
related.dll
sample.dll
search.dll
streamconv.dll
strres.dll
txmgr.dll
txtsvc.dll
ucvcn.dll
ucvja.dll
ucvko.dll
ucvtw.dll
ucvtw2.dll
vcard.dll
wallet.dll wallet
wlltvwrs.dll
xpctest.dll
xpiflash.dll

 

How to fix leaks in a dll

Stage 1: nsIModule conversion

  1. Convert dll to use nsIModule. Sample code is in  mozilla/xpcom/sample/nsSampleModule.cpp. Things to watch out for:
    1. nsIModule::UnregisterSelf should not return an Error.
    2. Cache factories created by modules in the module.
    The sample code does all this right. So sticking to closely is adviced.

Stage 2: Leak fixing (DONT DO THIS NOW)

  1. While in purify run bin/TestShutdown on the dll. For this you will need to find a CID that the module implements. Then invoke TestShutdown as
    1. TestShutdown {123d4-4908-490840-409850}
  2. Make sure there are no leaks from the purify output.

  3. Use ns<dll>Module::Shutdown() to release any global memory that is being leaked.