Re: Problems getting NSURLConnection to work
Re: Problems getting NSURLConnection to work
- Subject: Re: Problems getting NSURLConnection to work
- From: Jens Alfke <email@hidden>
- Date: Sat, 9 Feb 2008 15:42:58 -0800
On 8 Feb '08, at 9:19 PM, Matthew Delves wrote:
I've setup a class as a delegate for NSURLConnection, though when I
create the NSURLConnection and provide it a delegate (self), the
delegate methods don't get called. I know they don't get called as
I've put in NSLog() statements and these statements don't get
displayed.
My guess would be that, due to some bug elsewhere in your code, your
object is getting dealloced immediately after it's created. That will
cause its -dealloc method to release the URLConnection, which will
stop it. To test this hypothesis, put a breakpoint or NSLog call in
your dealloc method.
(Speaking of refcounting — I noticed that both urlRequest and urlData
are over-retained: they're created with alloc/init, but then -retain
is called again, creating two references.)
—Jens_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden