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: Jens Alfke <email@hidden>
- Date: Fri, 16 Apr 2010 09:25:44 -0700
On Apr 16, 2010, at 8:53 AM, Kyle Sluder wrote:
> 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.
That’s true in general, but in this case he’s setting the parser’s delegate to itself. Which is weird, but should mean that the object can’t possibly outlive the delegate :)
—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