releasing an object
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