On Aug 13, 2012, at 11:38 PM, Britt Durbrow wrote:
> OK, I think I've isolated the issue... basically, __weak, @public, and 
> -fno-objc-arc don't like to play nice together. If you set a @public __weak 
> instance variable (may also apply to stack variables, I haven't tested that 
> yet) in a file compiled with -fno-objc-arc, and then access it in a file 
> compiled with ARC turned on, the variable gets zeroed out.
> 
> I have reduced it to a simple test project, and I'm going to file a RADAR.

Please do;  maybe we can find a way to warn about the assignment to a __weak 
object in non-ARC.  That said, your code is buggy;  we do *not* guarantee 
anything about the representation  of a weak object, and it is not legal to 
access one in non-ARC code except by explicitly calling one of the specified 
runtime functions (and we don't encourage you to do that).

John.
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to