discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] GSXMLRPC: When is it released?


From: Richard Frith-Macdonald
Subject: Re: [Q] GSXMLRPC: When is it released?
Date: Wed, 14 Mar 2007 09:03:51 +0000

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


On 13 Mar 2007, at 06:43, Sungjin Chun wrote:

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

Hi,

Attached file is test file to sea when GSXMLRPC is released - so that
related socket will be closed. I've added code(NSLog(@"dealloc")) to
GSXMLRPC's dealloc and GSHTTPURLHandle's dealloc. But I cannot see the
message. And this causes problem because the program which uses GSXMLRPC
uses more and more sockets.

What should I do for close GSXMLRPC/GSHTTPURLHandle?

Looks like a memory leak ... the xmlrpc object never being released because the url handle was retaining it. I fixed that in svn. I never noticed this because I normally create a single GSXMLRPC instance and use it repeatedly, rather than creating a new instance for each call.

As a workaround until the next release of the library I would recommend creating a single xmlrpc instance ... actually I'd recommend doing that anyway as it's much, much more efficient, not just because it avoids repeated retain/release of the xmlrpc object and its ivars, but more importantly because it means that the xmlrpc object can keep the connection to the remote server open (assuming the remote server supports keepalive, which almost all do) rather than opening a new connection for every request.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFF97qESZ/wVHjv7MIRAgSpAKDRsnXPXx4axYwzFZbWeyD9NYxjbwCffy6C
sidxjhc5XRVCBf/WmWF5IS0=
=P6Rm
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]