• 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: Crash from NSURLConnection if delegate released too soon?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash from NSURLConnection if delegate released too soon?


  • Subject: Re: Crash from NSURLConnection if delegate released too soon?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 25 Aug 2014 14:13:42 -0700

> On Aug 25, 2014, at 1:43 PM, Howard Moon <email@hidden> wrote:
>
> The Apple docs show simply setting the connection and receivedData to nil, instead of calling release on them.

Do you have a strong [sic] reason to be using manual retain/release? If not, I'd _really_ recommend switching to ARC, at least for this one source file, especially since it sounds like you don't have the memory-management rules firmly memorized yet.

Have you run the static analyzer (Cmd-Shift-B)? It's good at finding and explaining ref-counting mistakes.

Have you tried using NSZombie? That's a good way to track down over-released objects at runtime. (See Technical Note TN2239, iOS Debugging Magic.)

—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


  • Follow-Ups:
    • Re: Crash from NSURLConnection if delegate released too soon?
      • From: Howard Moon <email@hidden>
References: 
 >Crash from NSURLConnection if delegate released too soon? (From: Howard Moon <email@hidden>)
 >Re: Crash from NSURLConnection if delegate released too soon? (From: Howard Moon <email@hidden>)
 >Re: Crash from NSURLConnection if delegate released too soon? (From: Howard Moon <email@hidden>)
 >Re: Crash from NSURLConnection if delegate released too soon? (From: Jens Alfke <email@hidden>)
 >Re: Crash from NSURLConnection if delegate released too soon? (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: Crash from NSURLConnection if delegate released too soon?
  • Next by Date: Re: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift
  • Previous by thread: Re: Crash from NSURLConnection if delegate released too soon?
  • Next by thread: Re: Crash from NSURLConnection if delegate released too soon?
  • Index(es):
    • Date
    • Thread