Skip to content


Make gradient collectable on line 57 prevents a leak #6

merged 1 commit into from

2 participants


Found with Insturments + Xcode 4.2b7

@domesticcatsoftware domesticcatsoftware merged commit 70887c9 into domesticcatsoftware:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 27, 2011
  1. @LordLobo
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 0 deletions.
  1. +1 −0 DCRoundSwitch/DCRoundSwitchKnobLayer.m
1 DCRoundSwitch/DCRoundSwitchKnobLayer.m
@@ -54,6 +54,7 @@ CGGradientRef GradientRefWithColors(CGColorSpaceRef colorSpace, CGColorRef start
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];
return gradient;
Something went wrong with that request. Please try again.