mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
304 lines
3.2 KiB
HTML
304 lines
3.2 KiB
HTML
<!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">
|
|
<meta name="GENERATOR" content="Mozilla/4.6 [en]C-NSCP (WinNT; U) [Netscape]">
|
|
<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</th>
|
|
</tr>
|
|
|
|
<tr BGCOLOR="#FFFF99">
|
|
<td COLSPAN="3"><b>bin/Components/</b></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>caps.dll</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>chardet.dll</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>history.dll</td>
|
|
|
|
<td>dp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>jsloader.dll</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>lwbrk.dll</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>necko.dll</td>
|
|
|
|
<td>warren</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>necko_resource.dll</td>
|
|
|
|
<td>warren</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>necko_file.dll</td>
|
|
|
|
<td>warren</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>nsgif.dll</td>
|
|
|
|
<td>kipp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>nslocale.dll</td>
|
|
|
|
<td>cata</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>mimetype.dll</td>
|
|
|
|
<td>dp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>oji.dll</td>
|
|
|
|
<td></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>profile.dll</td>
|
|
|
|
<td>dp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>raptorhtml.dll</td>
|
|
|
|
<td>kipp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>raptorview.dll</td>
|
|
|
|
<td>kipp</td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>rdf.dll</td>
|
|
|
|
<td>kipp</td>
|
|
|
|
<td></td>
|
|
</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></td>
|
|
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>xppref32.dll</td>
|
|
|
|
<td>neeti</td>
|
|
|
|
<td></td>
|
|
</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></td>
|
|
|
|
<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>
|
|
|
|
<br>
|
|
<h2>
|
|
How to fix leaks in a dll</h2>
|
|
|
|
<ol>
|
|
<li>
|
|
Convert dll to use nsIModule. Sample code is in <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSampleModule.cpp">mozilla/xpcom/sample/nsSampleModule.cpp</a></li>
|
|
|
|
<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>
|
|
|
|
<li>
|
|
Make sure there are no leaks from the purify output.<br>
|
|
Use ns<dll>Module::Shutdown() to release any global memory that is being
|
|
leaked.</li>
|
|
</ol>
|
|
|
|
<hr WIDTH="100%">
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
<br>
|
|
</body>
|
|
</html>
|