Skip to content

Instantly share code, notes, and snippets.

@falkolab
Last active Sep 22, 2015
Embed
What would you like to do?
Memory leak test case for Titanium SDK
function doClick(e) {
Alloy.createController("test").getView().open();
}
$.index.open();
<Alloy>
<Window class="container">
<Button onClick="doClick">Open test window</Button>
</Window>
</Alloy>
<Alloy>
<Window>
<Label>Simple test window</Label>
</Window>
</Alloy>
@falkolab
Copy link
Author

falkolab commented Sep 21, 2015

  1. Run app on device (Monitoring allocations on Android).
  2. Press GC.
  3. Create HPROF dump
  4. Open and then close test window
  5. Press GC once or twice
  6. Create second HPROF dump
  7. In second dump create histogram and press "Compare to another Heap Dump"

My result for Ti SDK 5.0.0.GA:

dump diff - MAT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment