Skip to content
This repository has been archived by the owner on Jun 2, 2018. It is now read-only.

Dealloc crash fix for observation #49

Merged
merged 2 commits into from
Dec 16, 2011
Merged

Conversation

BrianDoig
Copy link
Contributor

  • (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.

…ter the object had been deallocated.

Added ability to add observers with options.
zwaldowski added a commit that referenced this pull request Dec 16, 2011
Dealloc crash fix for observation.
@zwaldowski zwaldowski merged commit bfc3c5c into BlocksKit:master Dec 16, 2011
@zwaldowski
Copy link
Collaborator

This and some other changes will be rolled into 0.9.5 shortly. Huge thanks for your support!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants