Skip to content

Instantly share code, notes, and snippets.

Last active Sep 22, 2015
What would you like to do?
Memory leak test case for Titanium SDK
function doClick(e) {
<Window class="container">
<Button onClick="doClick">Open test window</Button>
<Label>Simple test window</Label>
Copy link

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