Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19994] Android: Fix memory leaks in UI proxies

GitHub Issuen/a
TypeStory
PriorityCritical
StatusClosed
ResolutionDone
Resolution Date2016-08-04T03:19:34.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0
ComponentsAndroid, Hyperloop
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2015-11-16T15:37:18.000+0000
Updated2016-08-04T03:19:34.000+0000

Description

If we generate a native UI proxy (say an android.view.View) and add it to a Titanium UI, we don't properly clean up all the native proxies we've generated leading to a large memory leak. Specifically we need a way to track all UI proxies added as children in the view hierarchy and explicitly release them when the top-level native view is asked to release in our Java code (TiUIView.releaseAllViews())

Comments

  1. Christopher Williams 2016-05-11

    https://github.com/appcelerator/hyperloop.next/pull/30
  2. Hans Knöchel 2016-05-11

    Thanks Chris! The changes are quite small, compared to their impact. It will take me some time to check several cases. Then [~cng] is our man to decide whether or not it can even get into 5.4.0 instead of 6.0.0. I guess fixing memory leaks cooould be fine, since it's no feature but a critical bugfix. But we can worry about when it's reviewed and merged. Thanks guys!

JSON Source