On May 27, 2008, at 9:09 PM, Jens Alfke wrote:
On 27 May '08, at 8:59 PM, Bill Bumgarner wrote:
In this case, it will change the way that GC handles the pointer, depending on how the class is compiled. GC is aware of the layout of objects and will scan only the fields that are marked __strong or are of an Objective-C object reference type.
But the pointer that's being lied about here is to a C++ object, which the collector should be ignoring anyway, right?

Unless you were to compile the class such that the objective-c world sees it as an Objective-C object pointer... Then it would be scanned as if it were rooted in the GC world and, potentially, bad things could happen.

BTW: This is similar to the current crash in 10.5.2 with the Media Browser in the Open Panel. The class layout bitmap is incorrect, denoting that a particular ivar is a void* instead of id, and -- thus -- the collector doesn't see a reference that should be keeping an object alive and said object is collected out from under subsystems that expect it to stick around.

b.bum

_______________________________________________

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