[TIMOB-26688] iOS: Proxy objects created in timers aren't released properly
GitHub Issue | n/a |
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-01-18T18:46:34.000+0000 |
Affected Version/s | Release 7.4.2 |
Fix Version/s | Release 8.0.0, Release 7.5.1 |
Components | n/a |
Labels | ios |
Reporter | John Staunton |
Assignee | Jan Vennemann |
Created | 2018-12-19T11:10:01.000+0000 |
Updated | 2019-01-23T21:45:56.000+0000 |
Description
Simplest case (iOS): Create an extremely simple app which just opens a controller containing a ListView with a headerView and a View inside that, and then close that controller again after a couple of seconds - the View inside the HeaderView is not destroyed / memory is not released, so the View remains, its proxy remains, the header proxy remains, the list proxy remains and the window proxy remains in memory... every time you reopen the controller the allocations grow until eventually the app freezes and refuses to respond.
[Sample app attached - 'assets' folder is empty, as they're just the standard assets in any new project created via studio and take up over 13Mb so won't fit on the ticket!]
Attachments
Hello, Thanks for sharing with us. It would be great if you can share a screenshot(using device and simulator both) which displays the issue.
Hi @Rakhi Mitro, what do you want a screenshot of? The only thing I can send is the Apple Instruments Allocations window, showing the memory not being released... but not sure how much this can add to your investigation, since a snapshot will just show one instance of the memory that is there. Let me know, and can provide it as necessary...
For the proxies this is normal behavior. A proxy is the native side of a JS object and remains in memory until the JS runtime runs its garbage collection. The view instance however should be deallocated every time the list view closes. Something in the in the list view keeps it around. Gonna take a closer look tomorrow.
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10629 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10630
FR Passed. Waiting for CR to merge
Verified the fix in SDK 8.0.0.v20190123061938. Closing.