• 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: NSPopUpButton failure after adding file names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPopUpButton failure after adding file names


  • Subject: Re: NSPopUpButton failure after adding file names
  • From: Rick Anderson <email@hidden>
  • Date: Thu, 15 May 2003 16:41:24 -0700

On Thursday, May 15, 2003, at 09:18 AM, Jonathan E. Jackel wrote:

[theDirectory autorelease];

This is your real problem. theDirectory is given to you as an autoreleased
object. You autorelease it again, which is a no-no.


I've only got a few minutes here. I would like to respond to some of the other suggestions you made (which I appreciate you having taken the time to explain) when I get some more time later.

I did just gave this a shot and it worked. Thanks.

On a side note, I wonder (without trying to sound too much like a exasperated Cocoa newbie) if this issue is documented anywhere on Apple's site. I've read quite a bit at Apple's site and elsewhere about memory management in Cocoa (i.e., retain, release, autorelease, etc.) and not once have I run across any warnings or explanations about the problem with performing an extra autorelease on an object. I guess it's entirely possible that it should be obvious to me, but having spent nearly an hour trying to remedy something that, as far as I know, isn't explained anywhere in Apple's documentation, it really grates on my nerves a bit.

--Rick Anderson
"The only difference between me and a madman,
is that I am not mad." -- Salvador Dali
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSPopUpButton failure after adding file names
      • From: publiclook <email@hidden>
References: 
 >RE: NSPopUpButton failure after adding file names (From: "Jonathan E. Jackel" <email@hidden>)

  • Prev by Date: Re: Reading string from .strings file not in a bundle?
  • Next by Date: Open Recent
  • Previous by thread: RE: NSPopUpButton failure after adding file names
  • Next by thread: Re: NSPopUpButton failure after adding file names
  • Index(es):
    • Date
    • Thread