diff options
author | Max <post@wickenrode.com> | 2015-01-04 03:57:26 +0100 |
---|---|---|
committer | Max <post@wickenrode.com> | 2015-01-04 03:57:26 +0100 |
commit | 2735e15bf5d4b3a976435ebb29ca9073de0e5071 (patch) | |
tree | e2088e442aa2d100ceafd8c0c4789e033fd12ac3 /Source/SPSplitView.m | |
parent | db64bd1b5affd00332906901ee57d6f681faf7ea (diff) | |
download | sequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.tar.gz sequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.tar.bz2 sequelpro-2735e15bf5d4b3a976435ebb29ca9073de0e5071.zip |
Formalize [x release], x = nil; convention
Take this commit as a proposal to formalize our existing "[x release], x = nil;" convention by introducing a macro for it.
Feel free to revert this commit if you see issues with the approch or implementation.
Diffstat (limited to 'Source/SPSplitView.m')
-rw-r--r-- | Source/SPSplitView.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/SPSplitView.m b/Source/SPSplitView.m index 9d5b59d8..599432cf 100644 --- a/Source/SPSplitView.m +++ b/Source/SPSplitView.m @@ -108,8 +108,8 @@ [viewMinimumSizes release]; [viewMaximumSizes release]; - if (animationTimer) [animationTimer invalidate], [animationTimer release], animationTimer = nil; - if (animationRetainCycleBypassObject) [animationRetainCycleBypassObject release], animationRetainCycleBypassObject = nil; + if (animationTimer) [animationTimer invalidate], SPClear(animationTimer); + if (animationRetainCycleBypassObject) SPClear(animationRetainCycleBypassObject); [[NSNotificationCenter defaultCenter] removeObserver:self]; [super dealloc]; @@ -233,8 +233,8 @@ // Otherwise, start an animation. } else { - if (animationTimer) [animationTimer invalidate], [animationTimer release], animationTimer = nil; - if (animationRetainCycleBypassObject) [animationRetainCycleBypassObject release], animationRetainCycleBypassObject = nil; + if (animationTimer) [animationTimer invalidate], SPClear(animationTimer); + if (animationRetainCycleBypassObject) SPClear(animationRetainCycleBypassObject); animationStartTime = [NSDate monotonicTimeInterval]; // Determine the animation length, in seconds, starting with a quarter of a second @@ -853,8 +853,8 @@ // If the animation has reached the end, ensure completion tasks are run if (animationProgress == 1) { - if (animationTimer) [animationTimer invalidate], [animationTimer release], animationTimer = nil; - if (animationRetainCycleBypassObject) [animationRetainCycleBypassObject release], animationRetainCycleBypassObject = nil; + if (animationTimer) [animationTimer invalidate], SPClear(animationTimer); + if (animationRetainCycleBypassObject) SPClear(animationRetainCycleBypassObject); // If uncollapsing, restore the original view and remove the helper if (!collapsibleSubviewCollapsed) { @@ -1132,12 +1132,12 @@ [[wrappedView window] makeFirstResponder:firstResponderToRestore]; } - [wrappedView release], wrappedView = nil; + SPClear(wrappedView); } - (void)dealloc { - if (wrappedView) [wrappedView release], wrappedView = nil; + if (wrappedView) SPClear(wrappedView); [super dealloc]; } |