On Wed, Oct 7, 2009 at 1:13 PM, Gabriel Zachmann <z...@tu-clausthal.de> wrote: > - (CALayer *) makeImageLayer: (NSString *) img_name inRect: (NSSize) size > { > // [snip] > CGImageRef cgImage = CGImageSourceCreateImageAtIndex( sourceRef, 0, NULL > ); > // [snip] > imgLayer.contents = (id) cgImage; > // [snip] > CGImageRelease( cgImage ); > > return imgLayer; > }
I think this is your problem right here. In a GC environment CALayer isn't going to retain its content, it stores a strong reference instead. But cgImage isn't collectable, so the strong reference does nothing. Look at the documentaiton for CFMakeCollectable. _______________________________________________ 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