Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1779] U/I objects not collected with GC. (memory leak?)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2013-04-03T22:41:57.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
ReporterTETSUYA
AssigneeMauro Parra-Miranda
Created2012-11-06T08:58:22.000+0000
Updated2016-03-08T07:40:40.000+0000

Description

U/I objects that changed visibility after displayed (or in "postlayout" event) are not collected with GC. I attached test code and pictures (object hisotgram in heap analyzed with MAT). *histogram filterd with "^ti.*ui.*". 1) Start test code and open DDMS, select test code process and click "Update heap" button. 2) In Heap tab, click "Cause GC" button a few times. 3) Click "Dump HPROF file" button, and get object hisotgram with MAT. <- Objects#0 column 4) Click menu button in Android emulator, do "update!" command 5 times. 5) In Heap tab, click "Cause GC" button a few times. 6) Click "Dump HPROF file" button, and get object hisotgram with MAT. <- Objects#1 column 7) Click menu button in Android emulator, do "update!" command 5 times. 8) Repeat 10 times above (to Object#9). pic01.png - attached test code's result. pic02.png - attached test code + "commented out part" in "postlayout" event handler. In addition, visibility changed with table's click handler, also increased memory allocation.

Attachments

FileDateSize
pic01.png2012-11-06T08:58:22.000+0000327372
pic02.png2012-11-06T08:58:22.000+0000331173
rowleak_test.js2012-11-06T08:58:22.000+00002316

Comments

  1. Daniel Sefton 2013-04-03

    JavaScript's garbage collection won't be activated unless the reference count reaches zero... so you actually need to be removing objects or setting them to null, not just changing the visibility.
  2. Mauro Parra-Miranda 2013-11-24

    Invalid issue.

JSON Source