Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-28208] Android: Several memory leaks in Titanium

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2020-12-02T04:46:05.000+0000
Affected Version/sRelease 9.2.1, Release 9.2.2
Fix Version/sRelease 10.0.0
ComponentsAndroid
Labelsn/a
ReporterHans Knöchel
AssigneeGary Mathews
Created2020-10-25T22:07:25.000+0000
Updated2020-12-04T22:09:21.000+0000

Description

We started using [LeakCanary](https://github.com/square/leakcanary) to find memory leaks and after playing with it for a few minutes, we already got 5 leaks (one is from an external module, the others from the core). An attempt to fix the module issue is [here](https://github.com/AndreaVitale/av.imageview/pull/101).

Attachments

FileDateSize
Screenshot_1603663285.png2020-10-25T22:06:57.000+0000142470
Screenshot_1603663318.png2020-10-25T22:06:57.000+0000283288
Screenshot_1603663368.png2020-10-25T22:06:57.000+0000281731
Screenshot_1603663378.png2020-10-25T22:06:57.000+0000274461
Screenshot_1603663453.png2020-10-25T22:06:57.000+0000294895
Screenshot_1603663473.png2020-10-25T22:06:57.000+0000283864

Comments

  1. Gary Mathews 2020-12-02

    After investigating this, a few of these memory leaks are caused by third party modules/code (av.imageview and Google GMS). The other valid leaks were indirectly addressed by the refactor to RecyclerView ([#12029](https://github.com/appcelerator/titanium_mobile/pull/12029)) I also ran LeakCanary on our KitchenSink-V2 suite, going through each component; everything looked good there.
  2. Hans Knöchel 2020-12-02

    Are you sure? It looks like it as least helped identifying [this new leak](https://github.com/appcelerator/titanium_mobile/pull/12298/commits/006f5b728f7f9cae8724edaa31e6a3d740196ae4). My team also mentioned that at least the menu item leak is another one, as well as one in ti.map. We will go on and fix it on our fork then, but thanks for checking!

JSON Source