Re: program termination after releasing self defined NSXMLParser class
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