From aa2f8b4cbddb68b4aadd6544eb754c8468746633 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 15 Jul 2009 00:23:13 +0000 Subject: - Make the DBView window the document window. This allows the document to be closed when the window is closed, freeing the document's memory - Update a number of dealloc methods to include more retained memory, and to avoid releasing non-retained memory - Remove notification observers and delegates where appropriate to avoid issues after document closing - Fix a couple of memory leaks - Support window cascading for all windows past the first, using the first window as the autosave window --- Source/SPPreferenceController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/SPPreferenceController.m') diff --git a/Source/SPPreferenceController.m b/Source/SPPreferenceController.m index 78d16a20..4a0d308e 100644 --- a/Source/SPPreferenceController.m +++ b/Source/SPPreferenceController.m @@ -61,7 +61,9 @@ if (self = [super initWithWindowNibName:@"Preferences"]) { prefs = [NSUserDefaults standardUserDefaults]; [self applyRevisionChanges]; + currentFavorite = nil; + keychain = nil; } return self; @@ -958,7 +960,7 @@ // ------------------------------------------------------------------------------- - (void)dealloc { - [keychain release], keychain = nil; + if (keychain) [keychain release], keychain = nil; if (currentFavorite) [currentFavorite release]; [super dealloc]; -- cgit v1.2.3