NSImageView setImage & when to release NSImage...
NSImageView setImage & when to release NSImage...
- Subject: NSImageView setImage & when to release NSImage...
- From: "Brad Peterson" <email@hidden>
- Date: Fri, 24 Oct 2003 11:10:56 +0000
Hi all,
Maybe this is explained somewhere and it's just too late for me to spot it,
but here goes...
If my goal is to display an image stored on disk, I might do something
like...
myImage = [[NSImage alloc] initByReferencingFile:filename];
[myImageView setImage: myImage];
Yes?
So... in this scenario, when does myImage get released? Am I responsible for
releasing it? I would think so, but I'm unclear on whether NSImageView
"needs" the NSImage once you've called setImage... or, perhaps it's smart
enough to release it when it's done?
Can anyone clarify what is probably a very basic thing I've somehow
overlooked?
Thanks,
B
_________________________________________________________________
See when your friends are online with MSN Messenger 6.0. Download it now
FREE!
http://msnmessenger-download.com
_______________________________________________
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.