Re: NSImageView setImage & when to release NSImage...
Re: NSImageView setImage & when to release NSImage...
- Subject: Re: NSImageView setImage & when to release NSImage...
- From: Chris Hanson <email@hidden>
- Date: Fri, 24 Oct 2003 15:02:35 -0500
On Oct 24, 2003, at 6:10 AM, Brad Peterson wrote:
So... in this scenario, when does myImage get released? Am I
responsible for releasing it?
Yes. If the NSImageView needs to keep the NSImage you gave it, the
NSImageView will retain or copy the NSImage you gave it.
This is generally how object ownership works in Cocoa. It's documented
in the memory management & object ownership rules documentation; there
are no special rules for individual classes that need to be documented
for those classes specifically.
-- Chris
--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.