Re: Any official workaround for NSURLConnection leaks on Tiger
Re: Any official workaround for NSURLConnection leaks on Tiger
- Subject: Re: Any official workaround for NSURLConnection leaks on Tiger
- From: Stéphane Sudre <email@hidden>
- Date: Tue, 19 Aug 2008 12:17:58 +0200
Le Aug 18, 2008 à 8:23 PM, Mark Pauley a écrit :
How are you seeing these leaks?
With Activity Monitor, RSIZE keeps on increasing every time a
connection is made.
With leaks, I can see that dozens (actually hundreds because I'm using
multiple NSURLConnections) of NSDictionarys, NSStrings are leaking.
Typically, I'm doing 5-10 connections per minute to download very
small file (100 Bytes max) and I'm probably leaking up to 1 MB per
minute. The leak happens when the connection is run.
Are you using object alloc?
Nope, leaks. It's easier for me to find problems this way but if you
have tips to do that with object alloc, they are welcome.
What happens if you wrap your NSURLConnection calls with an
NSAutoreleasePool instantiation?
I have already wrapped the callbacks and the requestWithURL: code
around NSAutoreleasePools.
As I said, no leaks on Leopard. And I don't have specific paths for
Tiger in my code.
I might add that I have 2 implementations of my networking code:
- NSURL with loadResourceDataNotifyingClient: (which is said to be
deprecated and which is why I moved to NSURLConnection)
- NSURLConnection with requestWithURL:
Both cases leak on Tiger.
My issue being that since my process can be running 24/7, I can't
allow any leaks.
--
Stephane _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden