assign properties, ARC and Core Foundation objects
问题 Edit 2. Thanks to Ken this is now working. And I even think I understand why :-) Here's the amended line: - (void) reCreatePath { CGMutablePathRef p = ::CGPathCreateMutable() ; ::CGPathMoveToPoint (p, 0, TL.x, TL.y) ; // [snip] ::CGPathAddLineToPoint (p, 0, BL.x, BL.y) ; ::CGPathCloseSubpath(p) ; self.path = p ; ::CGPathRelease(p) ; // <<== THIS IS IT!! :-) } Edit. I still don't get it. I tried Chuck suggestion: @property (nonatomic, strong) __attribute__((NSObject)) CGPathRef path ; Like so: