On 27/02/2008, at 5:59 PM, Antonio Nunes wrote:

On Feb 26, 2008, at 11:42 AM, Chris Suter wrote:

On a side note, it doesn't look like you have to call removeObserver: for notifications registered with NSNotificationCenter.

The garbage collection docs state:
"For example, a notification center should not form strong relationships to registered observers, otherwise it artificially prolongs the lifetime of those objects indefinitely."

I guess that corroborates it, but would anyone care to confirm Chris's assertion with some authority?

I put a break point on CXXNotificationUnregister (which is what removeObserver: ultimately calls) and you find that it gets called when a weak reference is zeroed.

- Chris

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to