Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26688] iOS: Proxy objects created in timers aren't released properly

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2019-01-18T18:46:34.000+0000
Affected Version/sRelease 7.4.2
Fix Version/sRelease 8.0.0, Release 7.5.1
Componentsn/a
Labelsios
ReporterJohn Staunton
AssigneeJan Vennemann
Created2018-12-19T11:10:01.000+0000
Updated2019-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

FileDateSize
Screen Shot 2019-01-02 at 5.49.05 PM.png2019-01-02T11:59:49.000+0000108934
TestMemory.zip2018-12-19T11:09:19.000+0000723521

Comments

  1. Rakhi Mitro 2018-12-20

    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.
  2. John Staunton 2018-12-20

    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...
  3. Jan Vennemann 2019-01-08

    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.
  4. Jan Vennemann 2019-01-17

    PR (master): https://github.com/appcelerator/titanium_mobile/pull/10629 PR (8_0_X): https://github.com/appcelerator/titanium_mobile/pull/10630
  5. Keerthi Mahalingam 2019-01-18

    FR Passed. Waiting for CR to merge
  6. Lokesh Choudhary 2019-01-23

    Verified the fix in SDK 8.0.0.v20190123061938. Closing.

JSON Source