In an application that is built gc-only it seems that any CALayers added as sublayers to an NSView are rooted (perhaps by CFRetain) and if those layers have any references to the NSView that is hosting them then they can cause a memory leak.
I have a view that has sublayers that accept completion blocks for actions on mouse clicks. If the block references the view then when the window is closed (set to release when closed) the window, view ect are retained because the layer is rooted. When running in instruments it is telling me that the layer has a "Non-zero CF retain count" and that's why it is rooted. Why would it need to be rooted in a gc-only app though? Shouldn't there be strong references instead? Is there a way to un-root the layer if it's not necessary for it to be rooted? rdar://problem/9749825 -- Michael_______________________________________________ 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