Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3118] TableView backgroundImage property causes huge memory leak

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2011-10-20T13:46:12.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsbug, ios, memory, tableview
ReporterJason Sznol
AssigneeMatthew Apperson
Created2011-09-01T14:46:09.000+0000
Updated2016-03-08T07:48:10.000+0000

Description

When setting a .png image as the backgroundImage of a tableView, the application leaks about 10-15 megs of memory. I am unsure if this is a problem with other file types. This was tested using instruments on an ipod touch 4th gen.

Attachments

FileDateSize
altBackground.png2011-09-26T07:04:54.000+0000228086

Comments

  1. Paul Dowsett 2011-09-23

    Jason Please would you provide [a usecase](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-CreatingGoodUsecases) and also all the rest of the information requested in the [Jira Ticket Checklist](http://wiki.appcelerator.org/display/guides/Contributing+to+Titanium#ContributingtoTitanium-Summary%3AJiraTicketChecklist). Once this ticket is complete and the issue is proven, we can move it to the main project. Many thanks
  2. Jason Sznol 2011-09-26

    I've attached the png. The code would look something similar to this in app.js. var win = Ti.UI.createWindow(); var table = Ti.UI.createTableView({ backgroundImage: 'altBackground.png' }); win.add(table); win.open();
  3. Matthew Apperson 2011-10-20

    Jason, Please update the ticket with this information, rather then adding the information to the comments. Also, how are you going about testing for the memory leak? (please also add this to the description of the ticket) Best regards, Matt
  4. Paul Dowsett 2012-02-17

    Closing due to inactivity. If this issue still exists, please raise a new ticket, including all the information in the [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist) to ensure that we can escalate it quickly. Read [How to Submit a Bug Report](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report) if you have not read it before, and always start a ticket using the [JIRA Ticket Template](https://wiki.appcelerator.org/display/guides/JIRA+Ticket+Template). Thanks in advance
  5. Luis Miguel García 2012-10-28

    I'm able to reproduce this problem. I have a 77 Kb .png. When I "open" the Window that has the tableView with backgroundImage, it "Force Closes". In the DDMS logs I can see that my application is trying to get 2 MB of memory, and the VM is denying so much memory. If I comment out the "backgroundImage" line while creating the tableView, I don't get the FC. I've tried to make a use case to upload to Jira, but I couldn't reproduce it outside my app.
  6. Luis Miguel García 2012-10-29

    I forgot to mention that I'm on Titanium Mobile 2.1.3 and Testing in Android Emulator 2.3.3. Is there any more info I can provide to help reproduce and fix the problem? Thanks a lot.

JSON Source