Since CGImage is derived from CFType you can just do:
[(id)aCGImageRef autorelease]

The reason being that CFType knows how to handle a -release message, and autorelease is just a way of deferring that message.
On 6 Aug 2008, at 09:29, Peter N Lewis wrote:

Given a CGImageRef, how can I autorelease it?

Perhaps this is obvious, or perhaps its impossible, but googling hasn't found me the answer yet except for a tantalizing comment in the docs for NSBitmapImageRep:
- (CGImageRef)CGImage (added in 10.5)
"Returns an autoreleased CGImage object (an opaque type) from the receiver's current bitmap data."
For CFStringRef, I know I can cast it to an NSString* and then  
autorelease it, but is there an equivalent for CGImageRef?
Thanks,
  Peter.

--
             Keyboard Maestro 3 Now Available!
               Now With Status Menu triggers!

Keyboard Maestro <http://www.keyboardmaestro.com/> Macros for your Mac
<http://www.stairways.com/>           <http://download.stairways.com/>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to [EMAIL PROTECTED]
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to