diff options
author | rowanbeentje <rowan@beent.je> | 2012-04-14 16:45:17 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2012-04-14 16:45:17 +0000 |
commit | ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67 (patch) | |
tree | 1d5f37ebf82349ed9e522d301d70df55fc8eaf75 /Source | |
parent | 3e85e46ba68f19b96a1e461e3fe039f4f61d6526 (diff) | |
download | sequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.tar.gz sequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.tar.bz2 sequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.zip |
- Fix a number of small memory leaks
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.m | 1 | ||||
-rw-r--r-- | Source/SPCustomQuery.m | 3 | ||||
-rw-r--r-- | Source/SPWindowControllerDelegate.m | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index eea43ba9..5575d8b7 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -201,6 +201,7 @@ [nibObjectsToRelease release]; if (favorites) [favorites release]; + if (favoritesRoot) [favoritesRoot release], favoritesRoot = nil; #endif if (mySQLConnection) [mySQLConnection release]; if (sshTunnel) [sshTunnel setConnectionStateChangeSelector:nil delegate:nil], [sshTunnel disconnect], [sshTunnel release]; diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index b8ab78e2..8a2bc021 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -798,6 +798,7 @@ // if(!queriesSeparatedByDelimiter) // TODO: How to combine queries delimited by DELIMITER? usedQuery = [[NSString stringWithString:[tempQueries componentsJoinedByString:@";\n"]] retain]; + if (lastExecutedQuery) [lastExecutedQuery release]; lastExecutedQuery = [[tempQueries lastObject] retain]; // Perform empty query if no query is given @@ -3705,6 +3706,7 @@ if ((self = [super init])) { usedQuery = [[NSString stringWithString:@""] retain]; + lastExecutedQuery = nil; fieldIDQueryString = nil; sortField = nil; isDesc = NO; @@ -4040,6 +4042,7 @@ [self clearQueryLoadTimer]; [usedQuery release]; + [lastExecutedQuery release]; [resultData release]; [favoritesManager release]; diff --git a/Source/SPWindowControllerDelegate.m b/Source/SPWindowControllerDelegate.m index 220930de..31876263 100644 --- a/Source/SPWindowControllerDelegate.m +++ b/Source/SPWindowControllerDelegate.m @@ -368,6 +368,7 @@ CGImageRef windowImage = CGWindowListCreateImage(CGRectNull, kCGWindowListOptionIncludingWindow, (unsigned int)[[self window] windowNumber], kCGWindowImageBoundsIgnoreFraming); NSBitmapImageRep *viewRep = [[NSBitmapImageRep alloc] initWithCGImage:windowImage]; [viewImage addRepresentation:viewRep]; + [viewRep release]; // Calculate the titlebar+toolbar height CGFloat contentViewOffsetY = [[self window] frame].size.height - [[[self window] contentView] frame].size.height; |