On 21/09/2009, at 7:22 AM, Ken Ferry wrote:
Well, yes, but copying the data out one way or another is probably
safer.
:-)
Once you've passed a CGImage to some other API, you really don't
know how
long it'll survive, so it's hard to say when it would be safe to
release the
NSBitmapImageRep.
So would this be acceptable on 10.5/GC?
@implementation NSBitmapImageRep (Additions)
- (CGImageRef)safeCGImage
{
CGImageRef cgImage = [self CGImage];
return (CGImageRef) CFMakeCollectable(CGImageCreateCopy(cgImage));
}
@end
--
Rob Keniger
_______________________________________________
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 arch...@mail-archive.com