gecko-dev/xpcom/doc/leaks.html

776 lines
7.1 KiB
HTML
Raw Normal View History

1999-09-29 01:07:32 +00:00
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Suresh Duddi">
1999-10-04 14:34:54 +00:00
<meta name="GENERATOR" content="Mozilla/4.61 [en] (WinNT; U) [Netscape]">
1999-09-29 01:07:32 +00:00
<title>Memory leaks fixing</title>
</head>
<body>
<center>
<h1>
Memory leaks fixing effort
<hr WIDTH="100%"></h1></center>
<h2>
Viewer</h2>
<ul>
<li>
Startup (not the firsttime)</li>
<li>
Show default page</li>
<li>
Quit</li>
</ul>
<table BORDER COLS=3 WIDTH="100%" >
<tr>
<th>Component</th>
<th>Leaks fixing by...</th>
<th>Status (<a href="#Stage 1: nsIModule conversion">nsIModule conversion</a>)</th>
1999-09-29 01:07:32 +00:00
</tr>
<tr BGCOLOR="#FFFF99">
<td COLSPAN="3"><b>bin/Components/</b></td>
</tr>
<tr>
<td>caps.dll</td>
<td>rjc</td>
1999-09-29 01:07:32 +00:00
1999-10-02 00:52:49 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>chardet.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>history.dll</td>
<td>dp</td>
<td>DONE (waiting to checkin)</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>jsloader.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>lwbrk.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>necko.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>necko_resource.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
1999-09-30 01:56:26 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>necko_file.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
1999-09-30 01:56:26 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>nsgif.dll</td>
<td>kipp</td>
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>nslocale.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>mimetype.dll</td>
<td>rjc</td>
1999-09-29 01:07:32 +00:00
1999-10-02 00:52:49 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>oji.dll</td>
<td>rjc</td>
1999-09-29 01:07:32 +00:00
1999-10-02 00:52:49 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>profile.dll</td>
1999-09-30 01:56:26 +00:00
<td>dp</td>
1999-09-29 01:07:32 +00:00
<td></td>
</tr>
<tr>
<td>raptorhtml.dll</td>
<td>kipp</td>
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>raptorview.dll</td>
<td>dp</td>
1999-09-29 01:07:32 +00:00
1999-09-30 01:56:26 +00:00
<td>DONE (doesnt cache factory)</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>rdf.dll</td>
<td>kipp</td>
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>uconv.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>ucvlatin.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>ucharuti.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>xpc3250.dll</td>
<td>kipp</td>
1999-09-29 01:07:32 +00:00
<td>DONE</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr>
<td>xppref32.dll</td>
<td>dp</td>
1999-09-29 01:07:32 +00:00
1999-09-30 01:56:26 +00:00
<td>DONE (waiting to checkin)</td>
1999-09-29 01:07:32 +00:00
</tr>
<tr BGCOLOR="#FFFF99">
<td COLSPAN="3"><b>bin/</b></td>
</tr>
<tr>
<td>jsdom.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorhtmlpars.dll</td>
<td>vidur</td>
1999-09-29 01:07:32 +00:00
<td></td>
</tr>
<tr>
<td>raptorgfxwin.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorweb.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorplugin.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorwidget.dll</td>
<td></td>
<td></td>
</tr>
</table>
1999-09-29 23:23:56 +00:00
<h2>
Apprunner only</h2>
&nbsp;
<table BORDER COLS=3 WIDTH="100%" >
<tr>
<th>Component</th>
<th>Leaks fixing by...</th>
<th>Status (<a href="#Stage 1: nsIModule conversion">nsIModule conversion</a>)</th>
1999-09-29 23:23:56 +00:00
</tr>
<tr>
<td>addrbook.dll</td>
<td>mscott</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>bookmarks.dll</td>
1999-10-02 00:52:49 +00:00
<td>rjc</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>brprof.dll</td>
1999-10-02 00:52:49 +00:00
<td>XXX
<br>rjc says: This should be removed from build. See bug # 13732</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>chrome.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>cnvts.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>cookie.dll</td>
<td>neeti</td>
1999-09-29 23:23:56 +00:00
1999-10-04 14:34:54 +00:00
<td>DONE</td>
1999-09-29 23:23:56 +00:00
</tr>
<tr>
<td>directory.dll</td>
1999-10-02 00:52:49 +00:00
<td>rjc</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>emitter.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ender.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>eventloop.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>intlcmpt.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>jar50.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>jsurl.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mime.dll</td>
<td>mscott</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>mork.dll</td>
<td>mscott</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>mozbrwsr.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozfind.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozucth.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozxfer.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgbase.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgcompo.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgdb.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgimap.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msglocal.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgnews.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>nativeapp.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>necko_about.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>necko_data.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>necko_ftp.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>necko_http.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>nsjpg.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td>DONE</td>
1999-09-29 23:23:56 +00:00
</tr>
<tr>
<td>nspng.dll</td>
<td>kipp</td>
1999-09-29 23:23:56 +00:00
<td>DONE</td>
1999-09-29 23:23:56 +00:00
</tr>
<tr>
<td>nsprefm.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>nsxpi.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>pics.dll</td>
<td>neeti</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>prefwind.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>rdfdomds.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>regviewer.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>related.dll</td>
1999-10-02 00:52:49 +00:00
<td>rjc</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>sample.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>search.dll</td>
1999-10-02 00:52:49 +00:00
<td>rjc</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>streamconv.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>strres.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>txmgr.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>txtsvc.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvcn.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvja.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvko.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvtw.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvtw2.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>vcard.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>wallet.dll</td>
<td>wallet</td>
1999-09-29 23:23:56 +00:00
<td></td>
</tr>
<tr>
<td>wlltvwrs.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>xpctest.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>xpiflash.dll</td>
<td></td>
<td></td>
</tr>
</table>
1999-09-29 01:07:32 +00:00
<br>&nbsp;
<h2>
How to fix leaks in a dll</h2>
<h3>
<a NAME="Stage 1: nsIModule conversion"></a>Stage 1: nsIModule conversion</h3>
1999-09-29 01:07:32 +00:00
<ol>
<li>
Convert dll to use nsIModule. Sample code is in&nbsp; <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSampleModule.cpp">mozilla/xpcom/sample/nsSampleModule.cpp</a>.
Things to watch out for:</li>
<ol>
<li>
nsIModule::UnregisterSelf should not return an Error.</li>
<li>
Cache factories created by modules in the module.</li>
</ol>
The sample code does all this right. So sticking to closely is adviced.</ol>
<h3>
1999-10-02 00:52:49 +00:00
<a NAME="Stage 2: Leak fixing"></a>Stage 2: Leak fixing <font color="#CC0000">(DONT
DO THIS NOW)</font></h3>
1999-09-29 01:07:32 +00:00
<ol>
1999-09-29 01:07:32 +00:00
<li>
While in purify run <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/tests/TestShutdown.cpp">bin/TestShutdown</a>
on the dll. For this you will need to find a CID that the module implements.
Then invoke TestShutdown as</li>
<ol>TestShutdown {123d4-4908-490840-409850}</ol>
1999-09-29 01:07:32 +00:00
<li>
1999-09-29 23:23:56 +00:00
Make sure there are no leaks from the purify output.</li>
<br>Use ns&lt;dll>Module::Shutdown() to release any global memory that
is being leaked.</ol>
1999-09-29 01:07:32 +00:00
<hr WIDTH="100%">
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
</body>
</html>