[maccode] r291 committed - Patch up a few leaks found in Adium.

2 views
Skip to first unread message

codesite...@google.com

unread,
Oct 28, 2009, 12:54:41 AM10/28/09
to mac...@googlegroups.com
Revision: 291
Author: stephen.holt
Date: Tue Oct 27 21:54:15 2009
Log: Patch up a few leaks found in Adium.

http://code.google.com/p/maccode/source/detail?r=291

Modified:
/trunk/Utilities/PSMTabBarControl/source/PSMAdiumTabStyle.m
/trunk/Utilities/PSMTabBarControl/source/PSMTabBarCell.m
/trunk/Utilities/PSMTabBarControl/source/PSMTabBarControl.m

=======================================
--- /trunk/Utilities/PSMTabBarControl/source/PSMAdiumTabStyle.m Tue Aug 25
11:49:10 2009
+++ /trunk/Utilities/PSMTabBarControl/source/PSMAdiumTabStyle.m Tue Oct 27
21:54:15 2009
@@ -976,7 +976,8 @@
}

if (tabBar != bar) {
- tabBar = bar;
+ [tabBar release];
+ tabBar = [bar retain];
}

[self drawBackgroundInRect:rect];
=======================================
--- /trunk/Utilities/PSMTabBarControl/source/PSMTabBarCell.m Tue Aug 25
11:49:10 2009
+++ /trunk/Utilities/PSMTabBarControl/source/PSMTabBarCell.m Tue Oct 27
21:54:15 2009
@@ -402,7 +402,7 @@
//NSRect cellFrame = [self frame];

[_controlView lockFocus];
- NSBitmapImageRep *rep = [[NSBitmapImageRep alloc]
initWithFocusedViewRect:cellFrame];
+ NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc]
initWithFocusedViewRect:cellFrame] autorelease];
[_controlView unlockFocus];
NSImage *image = [[[NSImage alloc] initWithSize:[rep size]]
autorelease];
[image addRepresentation:rep];
=======================================
--- /trunk/Utilities/PSMTabBarControl/source/PSMTabBarControl.m Tue Aug 25
11:49:10 2009
+++ /trunk/Utilities/PSMTabBarControl/source/PSMTabBarControl.m Tue Oct 27
21:54:15 2009
@@ -336,7 +336,7 @@
- (void)setStyle:(id <PSMTabStyle>)newStyle
{
if (style != newStyle) {
- [style release];
+ [style autorelease];
style = [newStyle retain];

// restyle add tab button

Reply all
Reply to author
Forward
0 new messages