• 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: quick and dirty NSData implosion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >quick and dirty NSData implosion (From: Jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Alexander Spohr <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: John Cebasek <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)
 >Re: quick and dirty NSData implosion (From: Graham Cox <email@hidden>)
 >Re: quick and dirty NSData implosion (From: jon <email@hidden>)

  • Prev by Date: Re: instance management in IB
  • Next by Date: Re: instance management in IB
  • Previous by thread: Re: example "miniBrowser" setting Garbage collection to "supported"
  • Next by thread: Re: quick and dirty NSData implosion
  • Index(es):
    • Date
    • Thread