• 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: NSImageView setImage & when to release NSImage...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >NSImageView setImage & when to release NSImage... (From: "Brad Peterson" <email@hidden>)

  • Prev by Date: Apply Metal Texture to custom views
  • Next by Date: Re: unconnected TextFields
  • Previous by thread: Re: NSImageView setImage & when to release NSImage...
  • Next by thread: addCursorRect overrides action/connection?
  • Index(es):
    • Date
    • Thread