Ensure we remove ourself from all observing

The file browser was still observing FSItemDidReloadNotification in its dealloc. Prior to ARC we used ‘self.outlineView = nil’ which removed us as observer, but after ARC we no longer execute that line.
This commit is contained in:
Allan Odgaard
2013-01-19 07:56:09 +01:00
parent 3b05ec3704
commit 0562d22716

View File

@@ -125,9 +125,9 @@ static NSSet* VisibleItems (NSOutlineView* outlineView, FSItem* root, NSMutableS
- (void)dealloc
{
[self applicationWillTerminate:nil];
[outlineView setDataSource:nil];
[outlineView setDelegate:nil];
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSApplicationWillTerminateNotification object:NSApp];
outlineView.dataSource = nil;
outlineView.delegate = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)applicationWillTerminate:(NSNotification*)aNotification