aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-07-15 00:23:13 +0000
committerrowanbeentje <rowan@beent.je>2009-07-15 00:23:13 +0000
commitaa2f8b4cbddb68b4aadd6544eb754c8468746633 (patch)
treecc4ca55dff6bcdda5480d7bb4d2fcdc16cb58517 /Source/SPNarrowDownCompletion.m
parent0612652448f32e620a96e923a44b463fa1b9e0dc (diff)
downloadsequelpro-aa2f8b4cbddb68b4aadd6544eb754c8468746633.tar.gz
sequelpro-aa2f8b4cbddb68b4aadd6544eb754c8468746633.tar.bz2
sequelpro-aa2f8b4cbddb68b4aadd6544eb754c8468746633.zip
- 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
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index 8b7b98ce..adadd902 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -96,6 +96,7 @@
mutablePrefix = [NSMutableString new];
textualInputCharacters = [[NSMutableCharacterSet alphanumericCharacterSet] retain];
caseSensitive = YES;
+ filtered = nil;
tableFont = [NSUnarchiver unarchiveObjectWithData:[[NSUserDefaults standardUserDefaults] dataForKey:@"CustomQueryEditorFont"]];
[self setupInterface];
@@ -109,9 +110,10 @@
[mutablePrefix release];
[textualInputCharacters release];
- [suggestions release];
+ // TODO: This may cause errors, I cannot see if it is always set up - only if !dictMode.
+ // [suggestions release];
- [filtered release];
+ if (filtered) [filtered release];
[super dealloc];
}
@@ -298,7 +300,7 @@
// so here we use the difference in height to find the new height for the window
// newHeight = [[self contentView] frame].size.height + (newHeight - [theTableView frame].size.height);
[self setFrame:NSMakeRect(old.x, old.y-newHeight, maxWidth, newHeight) display:YES];
- [filtered release];
+ if (filtered) [filtered release];
filtered = [newFiltered retain];
[theTableView reloadData];
}