Re: @property (retain) - Do I need to release in dealloc?
Re: @property (retain) - Do I need to release in dealloc?
- Subject: Re: @property (retain) - Do I need to release in dealloc?
- From: Dave Keck <email@hidden>
- Date: Tue, 8 Sep 2009 21:41:07 -1000
> It is not however clear, and I haven't found it in the guide, whether
> it's still my responsibility to call [_myProp release] in
> -(void)dealloc ?
There are varying opinions on how you go about it, but yes, you still
need to make sure _myProp is released in dealloc. I prefer
'self.myProp = nil;', but others will be quick to tell you to [_myProp
release]; instead. (The merits of each have been discussed in length
in the past - check the archives if you're curious.)
_______________________________________________
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