Issue #2678: forced zeroing weak references in public build.#2680
Issue #2678: forced zeroing weak references in public build.#2680tomball wants to merge 1 commit intogoogle:masterfrom
Conversation
| # define WEAK_ __weak | ||
| #else | ||
| # define WEAK_ __unsafe_unretained | ||
| # error j2objc requires zeroing Objective-C weak references. |
There was a problem hiding this comment.
Our internal build hits this error which this change.
|
That's good news, because j2objc users have been assuming zeroing weak references, like ARC has, since clang added the If something is broken internally, that means there's a similar problem where j2objc-including code isn't compiling with the Zeroing weak references cause the address of the object to be changed to nil (zero) when it's released. Objective-C ignores all messages sent to a nil reference, avoiding those crashes or memory overwrites. So we can remove the |
Fixes issue #2678 by forcing zeroing weak references in public build, which matches the internal build.