Encode and Decode CGMutablePathRef with ARC
问题 Under ARC, is it possible to encode/decode a CGMutablePathRef (or its non-mutable form) using NSCoding ? Naively I try: path = CGPathCreateMutable(); ... [aCoder encodeObject:path] but I get a friendly error from the compiler: Automatic Reference Counting Issue: Implicit conversion of an Objective-C pointer to 'CGMutablePathRef' (aka 'struct CGPath *') is disallowed with ARC What can I do to encode this? 回答1: NSCoding is a protocol. Its methods can only be used with objects that conform to