Yes, we use ARC code. It fails in nil_chk macro.
The cycle is real — there is no issues with cycle_finder — and it won't solve itself when the state changes:
— Take Form class.
— It contains a button, so it references it.
— Button is being assigned a listener, which is an inner class of the Form. Button obviously calls the listener, so it references it.
— Listener is an inner class of the Form, so (default behaviour) it references the form.
Effectively default behaviour forces us to choose between the following options:
1. Define all listener classes to have a @WeakOuter annotation.
2. Remove all listeners, when form is ready to be released.
3. Don't hold reference to buttons, instead use "findById" (or similar) every time it's needed.
All of these choices are extremely easy to forget and are extremely inconvenient.
Most developers don't even develop for iOS, they develop generic code, which runs in Android and Web (GWT) and usually debug in Web — so they won't even notice that something is wrong...
I know that the default implementation is way safer — but its memory management is just unmanageable for us. :(
P.S.: BTW — I LOVE J2OBJC!!!