[Psi-devel] The Hunt for Leaks

Maciek Niedzielski machekku at gmail.com
Mon Jan 24 12:53:59 PST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mircea Bardac (IceRAM) wrote:
> On Saturday - 22 January 2005 23:09, Mircea Bardac (IceRAM) wrote:
> 
>>You can find attached fixes for the history memory leaks.

I'm not sure if I got the your idea right:

First, you free r in edb_finished() like this:
> +				delete r; // free EDBResult *r
> 				return;

But then, to make sure, you check if it was really freed:
> -	delete d->r;
> +	if (d->r)
> +		delete d->r;

If this is what you meant, then there is one small problem.
To make 'if (d->r)' test work, you need 'r = 0;' after deleting r;


- --
Maciek
 xmpp:machekku at chrome.pl
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFB9Vwq7knNPWzAbeURAgVGAJoDumNvMZHAtO62JTrG20RLgIpqxgCfZ3bj
5iF38KW7wAQ84aWYlfQy/y0=
=5g9n
-----END PGP SIGNATURE-----


More information about the Psi-devel-affinix.com mailing list