• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Observing with GC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Observing with GC


  • Subject: Re: Observing with GC
  • From: Chris Suter <email@hidden>
  • Date: Wed, 27 Feb 2008 18:08:28 +1100


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@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

References: 
 >Observing with GC (From: Quincey Morris <email@hidden>)
 >Re: Observing with GC (From: Rob Keniger <email@hidden>)
 >Re: Observing with GC (From: glenn andreas <email@hidden>)
 >Re: Observing with GC (From: Rob Keniger <email@hidden>)
 >Re: Observing with GC (From: Bill Bumgarner <email@hidden>)
 >Re: Observing with GC (From: Quincey Morris <email@hidden>)
 >Re: Observing with GC (From: Chris Suter <email@hidden>)
 >Re: Observing with GC (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: Observing with GC
  • Next by Date: Re: NSTextField and NSTextAttachment
  • Previous by thread: Re: Observing with GC
  • Next by thread: Re: Observing with GC
  • Index(es):
    • Date
    • Thread