• 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: Pb with object release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pb with object release


  • Subject: Re: Pb with object release
  • From: Clark Cox <email@hidden>
  • Date: Wed, 9 Nov 2005 15:14:43 -0500

On 11/9/05, Simon Brée <email@hidden> wrote:
>
> Ok Sherm, I understand now.
>
> If I want to control the release of my image, I should then change my
> code in :
>
> >> NSImage *theDirIcon = [[NSImage alloc] init];
> >> [[NSWorkspace sharedWorkspace] iconForFile:theDirLocation];

No, you shouldn't do that. It is fine the way it was:

> NSImage *theDirIcon = [[NSWorkspace sharedWorkspace]
> iconForFile:theDirLocation];

Just don't release theDirIcon, it's not your responsibility to do so.

--
Clark S. Cox III
email@hidden
http://clarkcox3.livejournal.com/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Fwd: Pb with object release (From: Simon Brée <email@hidden>)

  • Prev by Date: Newbie question: Where did I lose track?
  • Next by Date: Re: Custom view drag to NSOutlineView and Finder
  • Previous by thread: Fwd: Pb with object release
  • Next by thread: Re: Pb with object release
  • Index(es):
    • Date
    • Thread