• 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: retain before [NSImageView setImage:] ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retain before [NSImageView setImage:] ?


  • Subject: Re: retain before [NSImageView setImage:] ?
  • From: Esteban Uribe <email@hidden>
  • Date: Fri, 3 May 2002 11:41:09 -0700 (PDT)

The usual assumption is that yes, any call setting an object, retains that object.
Once you setImage, the NSImage should be retained by Cocoa. When you call setImage again the old image should get released and the new one should be retained by setImage

-Esteban

On Friday, May 03, 2002, at 06:31PM, nicolas berloquin <email@hidden> wrote:

>Hi !
>
> the online docs don't say whether NSImageView calls retain on the image
>you pass as a parameter to setImage: .
>should I retain/release it myself, or is everything taken care of by
>cocoa ?
>
>and what if I call setImage: a second time with a different image ?
>
>thanks
>_______________________________________________
>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.
_______________________________________________
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.

  • Prev by Date: How to allow files drag from a tableView to the Finder ?
  • Next by Date: Re: New features in cocoa.mamasam.com
  • Previous by thread: Re: How to allow files drag from a tableView to the Finder ?
  • Next by thread: Re: retain before [NSImageView setImage:] ?
  • Index(es):
    • Date
    • Thread