mikeash / MAZeroingWeakRef

Zeroing weak references for retain/release Objective-C
Other
361 stars 56 forks source link

Return removeable handle from addWeakObserver. #20

Closed asarazan closed 11 years ago

asarazan commented 11 years ago

addWeakObserver:selector:name:object: now returns an opaque handle that can be removed with NSNotificationCenter's removeObserver: method.

This allows for temporary and cancelable observation.