Re: quick and dirty NSData implosion
Re: quick and dirty NSData implosion
- Subject: Re: quick and dirty NSData implosion
- From: Andy Lee <email@hidden>
- Date: Tue, 12 May 2009 01:34:39 -0400
On May 11, 2009, at 4:20 PM, jon wrote:
bookMarkurlString = [c decodeObjectForKey:@"bookMarkurlString"];
bookMarkTitle = [c decodeObjectForKey:@"bookMarkTitle"];
You need to retain these. The doc for decodeObjectForKey: says
"Decodes and returns an autoreleased Objective-C object..."
In general, when you have an invalid object reference, it's very
likely you have a memory management bug.
Don't forget to release them in your dealloc method.
--Andy
_______________________________________________
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