• 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: Question about scope of "convenience objects"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about scope of "convenience objects"


  • Subject: Re: Question about scope of "convenience objects"
  • From: Charles Steinman <email@hidden>
  • Date: Fri, 21 Sep 2007 08:20:26 -0700 (PDT)

--- Paul Bruneau <email@hidden>
wrote:

> But upon reading the simple rules at
>
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
>
> Tasks/MemoryManagementRules.html
>
> they say "A received object is normally guaranteed
> to remain valid
> within the method it was received in...That method
> may also safely
> return the object to its invoker."
>
> So it looks like I am ok after all to use my
> NSDictionaryObject in
> the method that called the method in which the
> object was created. Is
> this correct?

In general, yes. There's nothing magic about
autorelease. The documentation is pretty explicit
about what makes autoreleased objects go away -- it
happens when an NSAutoreleasePool is deallocated.

Cheers,
Chuck


      ____________________________________________________________________________________
Fussy? Opinionated? Impossible to please? Perfect.  Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7

_______________________________________________

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: 
 >Question about scope of "convenience objects" (From: Paul Bruneau <email@hidden>)

  • Prev by Date: Image Batch Processing
  • Next by Date: Re: Image Batch Processing
  • Previous by thread: Re: Question about scope of "convenience objects"
  • Next by thread: Re: Question about scope of "convenience objects"
  • Index(es):
    • Date
    • Thread