Re: Properties and memory management
Re: Properties and memory management
- Subject: Re: Properties and memory management
- From: mmalc crawford <email@hidden>
- Date: Tue, 05 Aug 2008 03:00:07 -0700
On Aug 5, 2008, at 2:48 AM, Negm-Awad Amin wrote:
This is the "mirror" of the problem, when you initialize an object.
Of course, theoretically in both cases the usage of setters are
dangerous. In most cases the deallocation of the object in reverse
order to its initialization will not lead to any problems. It is no
problem, when you have synthisized accessors, because they have noch
side-effects.
No, this is not the case -- Ken's reply was correct. If you use
automatic KVO notifications, your accessors will still have side
effects.
Again per Ken's reply, you should typically set instance variables
directly in init methods, and release them directly in dealloc.
mmalc
_______________________________________________
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