- (id)init
{
self = [super init];
if (self) {
_lineColor = CGColorCreateCopy([UIColor whiteColor].CGColor);
_linePath = CGPathCreateMutable();
}
return self;
}
- (void)dealloc
{
CFRelease(_linePath);
CFRelease(_lineColor);
}
- (void)setLineColor:(CGColorRef)lineColor
{
CFRetain(lineColor);
CFRelease(_lineColor);
_lineColor = CGColorCreateCopy(lineColor);
CFRelease(lineColor);
}
- (void)setLinePath:(CGPathRef)linePath
{
CFRetain(linePath);
CFRelease(_linePath);
_linePath = CGPathCreateMutableCopy(linePath);
CFRelease(linePath);
}