Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-3514] Memory leak when opening/closing a new window from an existing tab window

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-05-18T09:56:57.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-15
ComponentsiOS
Labelsn/a
ReporterScott Sampson
AssigneeBlain Hamon
Created2011-04-15T03:46:09.000+0000
Updated2011-05-18T09:56:57.000+0000

Description

I have a tab window (window A) with a tableview. When I click on a row in the tableview it opens a new window (window B). All I have on window B is an onclick to close the window on the leftNavButton.

Window A onclick code:

https://gist.github.com/6548c7fa9543d81f2b90">https://gist.github.com/6548c7fa9543d81f2b90

Window B return code:

https://gist.github.com/ecdacf378723f990a9fe">https://gist.github.com/ecdacf378723f990a9fe

The memory goes as follows:

App first opens: 10.36 MB
Click on Table View Row and open Window B: 10.65
Click on close of Window B: 10.63
Click on table view row and open window B again: 10.75
Click on close of Window B: 10.71

If we add more data to Window B the memory leak is amplified.

Titanium version: 1.2.2
Titanium SK 1.7.0
Iphone SDK 4.1 up to 4.3
xcode 4.0.1

Comments

  1. Blain Hamon 2011-04-15

    Currently fixed in side branch, not Master.
  2. Eric Merriman 2011-05-18

    I used the provided sample code plus a few additions to get it working and set up a test with Instruments. Instruments showed to app at 1MB shortly after launch and analytics load. On the first window open, it rose to 1.14MB. After about 5 minutes of repeated row clicking and window opening, the memory hovered at 1.14-1.15 and showed no sign of a steady increase. This was with 1.7.0RC1 and iPhone 4, iOS 4.3.3. Closing.

JSON Source