Re: Question about scope of "convenience objects"
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