mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Reinstate the -finalize method to remove ourselves as observer.
I was confusing KVO with Notifications earlier, as the GC Programming Guide explicitly says one should not unregister notifications in a finalize method when using GC.
This commit is contained in:
@@ -158,15 +158,15 @@ contextMenuItemsForElement:(NSDictionary *)element
|
||||
return [historyController valueForKeyPath:[@"repository.config." stringByAppendingString:config]];
|
||||
}
|
||||
|
||||
// - (void) finalize
|
||||
// {
|
||||
// [historyController removeObserver:self forKeyPath:@"webCommit"];
|
||||
// [super finalize];
|
||||
// }
|
||||
- (void) finalize
|
||||
{
|
||||
[historyController removeObserver:self forKeyPath:@"webCommit"];
|
||||
[super finalize];
|
||||
}
|
||||
|
||||
- (void) preferencesChanged
|
||||
{
|
||||
[[self script] callWebScriptMethod:@"enableFeatures" withArguments:nil];
|
||||
[[self script] callWebScriptMethod:@"enableFeatures" withArguments:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user