[~jquick], [~gmathews]
I noticed a change in the memory management after the recent changes on it that I think deserves some attention. Until 7.2.0.GA the sample app I have attached had this behavior.
1. Open the application.
2. Click "Remove".
3. Force GC through the Android profiler tool.
4. Click "Add again".
The colorized views are successfully added again to the window.
After the merge of:
https://github.com/appcelerator/titanium_mobile/pull/10174 the same sequence results in a crash (attached in the ticket). That happens because the Views are garbage collected.
The same goes with Ti.Map module when AnnotaionProxies are released (that happens when they are removed from the MapView) for example.
What bothers me is that this change may cause problems in applications that are relying on keeping the references to proxies in the same context after heavy memory usage (one that can cause the system to garbage collect). And I think if that is the case for Proxies in general we may have that problem in a variety of usages.
How do you think we should go about that?
Note: I haven't matched the position of the views to be related to the device's screen. I have been testing on Pixel emulator.
P.S. We talked with Joshua about that earlier this week and at that moment we had a upcoming changes in the most recent PR for memory management. I have tested today with it and the described change in behavior is still present.
master: https://github.com/appcelerator/titanium_mobile/pull/10221 7_3_X: https://github.com/appcelerator/titanium_mobile/pull/10224
Verified the fix in SDK 7.3.0.v20180807095741 & 7.4.0.v20180807122127. Closing.