Re: __block __weak - am I doing this right?
Re: __block __weak - am I doing this right?
- Subject: Re: __block __weak - am I doing this right?
- From: Fritz Anderson <email@hidden>
- Date: Thu, 16 Feb 2012 18:04:03 -0600
On 16 Feb 2012, at 2:05 PM, Greg Parker wrote:
> The question is, who retains the observer? The __block __weak variable does not, because it's weak. NSNotificationCenter does not, as I understand it.
I've lost the earlier parts of this thread… Are we talking about -[NSNotificationCenter addObserverForName:object:queue:usingBlock:]? The documentation says it's necessary to keep an anchoring reference under GC, but:
> (In a reference counted environment, the system retains the returned observer object until it is removed, so there is no need to retain it yourself.)
— F
_______________________________________________
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