Re: observers removed?
Re: observers removed?
- Subject: Re: observers removed?
- From: Jeff Johnson <email@hidden>
- Date: Sun, 27 Jul 2008 12:43:31 -0500
On Jul 27, 2008, at 12:36 PM, James Maxwell wrote:
Stupid question, probably, but if an object is deleted, is it
automatically removed as an observer of notifications? Or should I
write a removeObserver into my dealloc?
J.
James,
No, an object is not automatically removed as an observer. Definitely
call removeObserver: before your object is deallocated. This is not a
stupid question, because this issue is the cause of innumerable crashes.
-Jeff
_______________________________________________
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