假设我在'drawRect:rect'方法中获取当前上下文并创建路径。调用'CGContextDrawPath'方法后,这条路径是什么? 是安全释放还是导致内存泄漏,还是保持不变?我是否需要手动调用'CGPathRelease'
CGContextRef context = UIGraphicsGetCurrentContext();
CGMutablePathRef path = CGPathCreateMutable();
CGPathMoveToPoint(path, nil, 20, 50);
CGPathAddLineToPoint(path, nil, 20, 100);
CGContextAddPath(context, path);
//Do something else here
CGContextDrawPath(context, kCGPathFillStroke);