diff options
author | Max <post@wickenrode.com> | 2015-01-04 21:15:43 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-01-04 21:15:43 +0100 |
commit | e201531daa71ee1a2e2a0f927c619947126c9d3d (patch) | |
tree | 9b43cecf579b4318ec9b8f04c970a40c3232ba15 /Source/SPNarrowDownCompletion.m | |
parent | 5b55d8c4d24b0c24a5dc74a49cfd70448146d582 (diff) | |
download | sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.tar.gz sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.tar.bz2 sequelpro-e201531daa71ee1a2e2a0f927c619947126c9d3d.zip |
Addition to commit 2735e15b
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r-- | Source/SPNarrowDownCompletion.m | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m index cb1ba20b..d5391644 100644 --- a/Source/SPNarrowDownCompletion.m +++ b/Source/SPNarrowDownCompletion.m @@ -159,18 +159,16 @@ [NSObject cancelPreviousPerformRequestsWithTarget:self]; if(stateTimer != nil) { [stateTimer invalidate]; - [stateTimer release]; - stateTimer = nil; + SPClear(stateTimer); } - if (staticPrefix) [staticPrefix release]; - [mutablePrefix release]; - [textualInputCharacters release]; - [originalFilterString release]; - if(syncArrowImages) [syncArrowImages release]; - if(suggestions) [suggestions release]; - - if (filtered) [filtered release]; - if (databaseStructureRetrieval) [databaseStructureRetrieval release]; + SPClear(mutablePrefix); + SPClear(textualInputCharacters); + SPClear(originalFilterString); + if (staticPrefix) SPClear(staticPrefix); + if (syncArrowImages) SPClear(syncArrowImages); + if (suggestions) SPClear(suggestions); + if (filtered) SPClear(filtered); + if (databaseStructureRetrieval) SPClear(databaseStructureRetrieval); [super dealloc]; } @@ -181,8 +179,7 @@ // Invalidate the timer now to prevent retain cycles preventing deallocation if (stateTimer != nil) { [stateTimer invalidate]; - [stateTimer release]; - stateTimer = nil; + SPClear(stateTimer); } closeMe = YES; @@ -204,8 +201,7 @@ isQueryingDatabaseStructure = NO; if(stateTimer) { [stateTimer invalidate]; - [stateTimer release]; - stateTimer = nil; + SPClear(stateTimer); if(syncArrowImages) SPClear(syncArrowImages); [self performSelectorOnMainThread:@selector(reInvokeCompletion) withObject:nil waitUntilDone:YES]; closeMe = YES; @@ -222,8 +218,7 @@ { if(stateTimer) { [stateTimer invalidate]; - [stateTimer release]; - stateTimer = nil; + SPClear(stateTimer); } [theView setCompletionIsOpen:NO]; [self close]; |