• 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
releasing an object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

releasing an object


  • Subject: releasing an object
  • From: Nick Rogers <email@hidden>
  • Date: Sat, 10 Oct 2009 16:01:47 +0530

Hi,
There is a instance variable in my AppController class named "Volume".
I'm doing alloc and initWithDictionary to get an instance of Volume.
I have to do [selectedPTVolume retain]; when allocing to get it to work properly.
When destroying this object to get a new one, I'm doing [selectedPTVolume release]; but then the retainCount is still one.
If I release it twice, the GUI hangs (selectedPTVolume contains the root item of a outline view).


How to release it properly?
Shall I get its retainCount and then release it that many times?

Thanks,
Nick


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: releasing an object
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: using QLPreviewPanel and supporting 10.5
  • Next by Date: Re: releasing an object
  • Previous by thread: Re: UTIs and readFromURL/writeToURL
  • Next by thread: Re: releasing an object
  • Index(es):
    • Date
    • Thread