• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problems getting NSURLConnection to work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Problems getting NSURLConnection to work (From: Matthew Delves <email@hidden>)

  • Prev by Date: Re: references to controllers in document based applications
  • Next by Date: Re: What's the replacement for GetMBarHeight?
  • Previous by thread: Re: Problems getting NSURLConnection to work
  • Next by thread: Re: Problems getting NSURLConnection to work
  • Index(es):
    • Date
    • Thread