[TIMOB-28208] Android: Several memory leaks in Titanium
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2020-12-02T04:46:05.000+0000 |
Affected Version/s | Release 9.2.1, Release 9.2.2 |
Fix Version/s | Release 10.0.0 |
Components | Android |
Labels | n/a |
Reporter | Hans Knöchel |
Assignee | Gary Mathews |
Created | 2020-10-25T22:07:25.000+0000 |
Updated | 2020-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
File | Date | Size |
---|---|---|
Screenshot_1603663285.png | 2020-10-25T22:06:57.000+0000 | 142470 |
Screenshot_1603663318.png | 2020-10-25T22:06:57.000+0000 | 283288 |
Screenshot_1603663368.png | 2020-10-25T22:06:57.000+0000 | 281731 |
Screenshot_1603663378.png | 2020-10-25T22:06:57.000+0000 | 274461 |
Screenshot_1603663453.png | 2020-10-25T22:06:57.000+0000 | 294895 |
Screenshot_1603663473.png | 2020-10-25T22:06:57.000+0000 | 283864 |
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.
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!