This commit is contained in:
dp%netscape.com 1999-09-29 01:07:32 +00:00
Родитель 96ce14e798
Коммит f5f9bef6b0
1 изменённых файлов: 303 добавлений и 0 удалений

303
xpcom/doc/leaks.html Normal file
Просмотреть файл

@ -0,0 +1,303 @@
<!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>&nbsp;
<h2>
How to fix leaks in a dll</h2>
<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></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&lt;dll>Module::Shutdown() to release any global memory that is being
leaked.</li>
</ol>
<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>