objective c - Is a CGContext an object? -
I've been programming for 2 months (so I am quite new) and I am currently learning how to attract Graphics for an iPhone app but I need clarification on These opaque types mean that you do not have to know and there is no need to take care . Apple can change its interior with every release and we do not know (and it is not needed). Typically, the But what if Common Core Foundation memory naming patterns apply: You do not need to issue CGContext . To create the current reference we use
CGContextRef currentContext = UIGraphicsGetCurrentContext () , if here I understand well (and please correct me if I am wrong),
UIGraphicsGetCurrentContext () On the current context, we provide it on an indicator type
CGContexRef . Is there an object allocated to memory on the heap in the current context, or is it only a type of variable on the stack? I know that we use the pointer to work with the same data and avoid copying the big memory block (right?), But actually a
CGContext , an object, a Straight or whatever?
FooRef type is the indication of something, now it has been defined:
typedef struct CGContext * CGContextRef;
struct CGContext looks like this, we do not know. Generally maintain / release functions are:
CGContextRef CGContextRetain (CGContextRef c); It looks as if it is actually the core forwardness (and perhaps Objective-C) object; Zero CGContextRelease (CGContextRef C);
CGContextRef or
copy .
Comments
Post a Comment