aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-04-14 16:45:17 +0000
committerrowanbeentje <rowan@beent.je>2012-04-14 16:45:17 +0000
commitec277286b0200cf5c36c4bb2ef11cb5fd9b31a67 (patch)
tree1d5f37ebf82349ed9e522d301d70df55fc8eaf75 /Frameworks
parent3e85e46ba68f19b96a1e461e3fe039f4f61d6526 (diff)
downloadsequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.tar.gz
sequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.tar.bz2
sequelpro-ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67.zip
- Fix a number of small memory leaks
Diffstat (limited to 'Frameworks')
-rw-r--r--Frameworks/PSMTabBar/PSMRolloverButton.m4
-rw-r--r--Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m17
2 files changed, 6 insertions, 15 deletions
diff --git a/Frameworks/PSMTabBar/PSMRolloverButton.m b/Frameworks/PSMTabBar/PSMRolloverButton.m
index 988abbb2..eebbd68e 100644
--- a/Frameworks/PSMTabBar/PSMRolloverButton.m
+++ b/Frameworks/PSMTabBar/PSMRolloverButton.m
@@ -24,6 +24,8 @@
[self resetCursorRects];
_myTrackingRectTag = -1;
+ _rolloverImage = nil;
+ _usualImage = nil;
}
- (void)dealloc
@@ -31,6 +33,8 @@
[[NSNotificationCenter defaultCenter] removeObserver:self];
[self removeTrackingRect];
+ [_rolloverImage release];
+ [_usualImage release];
[super dealloc];
}
diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
index b28fbbf8..b0a96ccd 100644
--- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
+++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m
@@ -655,21 +655,10 @@
{
NSRect cellFrame = [cell frame];
CGFloat insetLabelWidth = 0;
- BOOL tabBarIsRightOfSelectedTab = NO;
-
- // Determine if the selected tab is right of this tab
- for (PSMTabBarCell *aCell in [tabBar cells]) {
- if (aCell == cell) break;
- if ([aCell state] == NSOnState) {
- tabBarIsRightOfSelectedTab = YES;
- break;
- }
- }
-
+
// close button
if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed] && [cell isHighlighted]) {
- NSSize closeButtonSize = NSZeroSize;
NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame];
NSImage * closeButton = nil;
@@ -677,9 +666,7 @@
if ([cell closeButtonOver]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonOver : sequelProCloseButtonOver;
if ([cell closeButtonPressed]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonDown : sequelProCloseButtonDown;
-
- closeButtonSize = [closeButton size];
-
+
if ([controlView isFlipped]) {
closeButtonRect.origin.y += closeButtonRect.size.height;
}