I'm working on a program which does lots of switching between CGImage,
CIIMage and NSImage. One thing I found out is
that it seems if you get a CGImage from NSBitmapImageRep:

CGImage *cgImg = [NSBitmapImageRep CGImage];

And later you release it, by:

CGImageRelease(cgImg);

It would cause a BAD_ACCESS error. The same thing happened when you have a
NSBitmapImageRep created from CGImage.

outputBitmapRep = [[[NSBitmapImageRep alloc] initWithCGImage:cgImg]
autorelease];
CGImageRelease(cgImg); ----> This causes BAD_ACCESS when the pool drains.

So is it true that those routines only get a reference to the image?

Thanks.

Regards,
DairyKnight
_______________________________________________

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

Reply via email to