• 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: program termination after releasing self defined NSXMLParser class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: program termination after releasing self defined NSXMLParser class


  • Subject: Re: program termination after releasing self defined NSXMLParser class
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 16 Apr 2010 08:53:25 -0700

On Apr 16, 2010, at 2:58 AM, Dominic Dauer <email@hidden> wrote:

Ok. Sorry for that. I never worked with the debugger.

Whenever I hear this from a programmer, I cringe. It's like hearing a carpenter say, "I've never used a screwdriver."



After I entered bt or backtrace I got the following message:

Program received signal:  “EXC_BAD_ACCESS”.
#0  0x93e0bedb in objc_msgSend ()
#1  0x00000000 in ?? ()

Ross is probably right. You need to nil out weak references before releasing things. Since you don't know if the NSXMLParser is going to live beyond your releasing it, you don't know if it's going to later try messaging its delegate. If that delegate has been dealloced, a crash ensues.


--Kyle Sluder
_______________________________________________

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: program termination after releasing self defined NSXMLParser class
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: How to find all clipping siblings for a view?
  • Next by Date: Re: How to empty the Trash programmatically?
  • Previous by thread: MKMapView crashes if released to early / in the wrong moment
  • Next by thread: Re: program termination after releasing self defined NSXMLParser class
  • Index(es):
    • Date
    • Thread