Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6 from LordLobo/patch-1

Make gradient collectable on line 57 prevents a leak
  • Loading branch information...
commit 70887c99dca9ccccf056f2f966057a2de68c1af7 2 parents f0c34d8 + 883eb1d
@domesticcatsoftware authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  DCRoundSwitch/DCRoundSwitchKnobLayer.m
View
1  DCRoundSwitch/DCRoundSwitchKnobLayer.m
@@ -56,6 +56,7 @@ CGGradientRef CreateGradientRefWithColors(CGColorSpaceRef colorSpace, CGColorRef
CGColorRef colors[] = {startColor, endColor};
CFArrayRef colorsArray = CFArrayCreate(NULL, (const void**)colors, sizeof(colors) / sizeof(CGColorRef), &kCFTypeArrayCallBacks);
CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, colorsArray, colorStops);
+ [NSMakeCollectable(gradient) autorelease];
CFRelease(colorsArray);
return gradient;
}
Please sign in to comment.
Something went wrong with that request. Please try again.