Autorelease for CGMutablePathRef?
Posted
by huggie
on Stack Overflow
See other posts from Stack Overflow
or by huggie
Published on 2010-05-12T14:09:42Z
Indexed on
2010/05/29
8:32 UTC
Read the original article
Hit count: 259
objective-c
|quartz
Hi,
I am developing for iphone. I want to creating a mutable path via CGPathCreateMutable(), and I want to return it out of the function which creates it. I'm suppose to call a CGPathRelease() when I'm done with it. But since I'm returning it I wish to autorelease it. Since Quartz path is a C code (and doesn't look like an objective C object), is it correct that I cannot call autorelease on it?
Edit: For others who stumble upon this question, the below advise is for C functions returning Core foundation objects only. For objective C methods returning Core foundation objects, see http://stackoverflow.com/questions/2901942/ownership-regarding-to-returned-quartz-objects
© Stack Overflow or respective owner