Release the bar color after creating it. Fixes a leak that I found using leaks.
authorboredzo
Sun Jul 06 15:14:04 2008 +0000 (2008-07-06)
changeset 4136642c27e46937
parent 4135 9d0747a53f45
child 4137 a8b169b45c40
Release the bar color after creating it. Fixes a leak that I found using leaks.
Plugins/Displays/iCal/GrowliCalWindowView.m
     1.1 --- a/Plugins/Displays/iCal/GrowliCalWindowView.m	Sun Jul 06 15:10:15 2008 +0000
     1.2 +++ b/Plugins/Displays/iCal/GrowliCalWindowView.m	Sun Jul 06 15:14:04 2008 +0000
     1.3 @@ -172,7 +172,10 @@
     1.4  		tbcolor[2] = [borderColor blueComponent];
     1.5  		tbcolor[3] = [borderColor alphaComponent];
     1.6  		CGColorRef barcolor = CGColorCreate(cspace,tbcolor);
     1.7 -		CGContextSetFillColorWithColor(context,barcolor);
     1.8 +		if (barcolor) {
     1.9 +			CGContextSetFillColorWithColor(context,barcolor);
    1.10 +			CFRelease(barcolor);
    1.11 +		}
    1.12  		CGRect titlebar = CGRectMake(0,CGRectGetMinY(shape),CGRectGetWidth(shape),15);
    1.13  		addTopRoundedRectToPath(context,titlebar,BORDER_RADIUS_PX);
    1.14  		CGContextFillPath(context);