zwaldowski/BlocksKit — pull request #49 by BrianDoig (2011-12-16 01:42:59+00:00)
Title: Dealloc crash fix for observation

- (void)removeObserverForKeyPath:(NSString *)inKeyPath identifier:(NSString *)token;
- (void)removeAllBlockObservers;

These two methods could crash because dealloc calls free as soon as it exits. The dispatch_asynch could cause the removal of the observer after free has occurred.

- (NSString *)addObserverForKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options task:(BKObservationBlock)task;
- (void)addObserverForKeyPath:(NSString *)keyPath identifier:(NSString *)token options:(NSKeyValueObservingOptions)options task:(BKObservationBlock)task;

These two methods were added so that you can create a observer that requires one of the options to function properly.