# HG changeset patch # User boredzo # Date 1215357244 0 # Node ID 642c27e46937a495d827c874ba97f2b2b18d5c37 # Parent 9d0747a53f4585fdcf72a4e9ca57fb1e4bfd6394 Release the bar color after creating it. Fixes a leak that I found using leaks. diff -r 9d0747a53f45 -r 642c27e46937 Plugins/Displays/iCal/GrowliCalWindowView.m --- a/Plugins/Displays/iCal/GrowliCalWindowView.m Sun Jul 06 15:10:15 2008 +0000 +++ b/Plugins/Displays/iCal/GrowliCalWindowView.m Sun Jul 06 15:14:04 2008 +0000 @@ -172,7 +172,10 @@ tbcolor[2] = [borderColor blueComponent]; tbcolor[3] = [borderColor alphaComponent]; CGColorRef barcolor = CGColorCreate(cspace,tbcolor); - CGContextSetFillColorWithColor(context,barcolor); + if (barcolor) { + CGContextSetFillColorWithColor(context,barcolor); + CFRelease(barcolor); + } CGRect titlebar = CGRectMake(0,CGRectGetMinY(shape),CGRectGetWidth(shape),15); addTopRoundedRectToPath(context,titlebar,BORDER_RADIUS_PX); CGContextFillPath(context);