分析器正在标记内存问题。通常我会使用自动释放,但这在 Core Foundation 中是不可能的。如何修复此错误?
- (CGMutablePathRef)NewCGMutablePathRefCreateWithRoundedRectForRect:(CGRect)rect andRadius:(CGFloat)radius andMargin:(CGFloat)margin andrIndent:(CGFloat)rIndent andlIndent:(CGFloat)lIndent
{
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, NULL, CGRectGetMidX(rect), CGRectGetMinY(rect) + margin);
CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect) - margin - rIndent, CGRectGetMinY(rect) + margin, CGRectGetMaxX(rect) - margin - rIndent, CGRectGetMaxY(rect) - margin, radius);
CGPathAddArcToPoint(path, NULL, CGRectGetMaxX(rect) - margin - rIndent, CGRectGetMaxY(rect) - margin, CGRectGetMinX(rect) + margin + lIndent, CGRectGetMaxY(rect) - margin, radius);
CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect) + margin + lIndent, CGRectGetMaxY(rect) - margin, CGRectGetMinX(rect) + margin + lIndent, CGRectGetMinY(rect) + margin, radius);
CGPathAddArcToPoint(path, NULL, CGRectGetMinX(rect) + margin + lIndent, CGRectGetMinY(rect) + margin, CGRectGetMaxX(rect) - margin, CGRectGetMinY(rect) +margin, radius);
CGPathCloseSubpath(path);
return path;
}
按照建议添加发布路径代码后,我得到另一个错误加上原来的错误?