Giter Club home page Giter Club logo

leak-test's Introduction

Rubymotion Android Memory Leak Test

Setup

  • connect your device to your mac
  • make sure to use the right api version for your target device (see rakefile, currently API Version 19)
  • Install Android Studio (http://developer.android.com/sdk/index.html)
  • Install Eclipse Memory Analyzer (https://eclipse.org/mat/)
  • Open Android Studio
  • Create a new project (sorry, haven't yet found out how to start Android Device Manager without a project)
  • Click on the second to last item (little Android Symbol) with the tooltip "Android Device Monitor"
  • you can close Android Studio now
  • On the left side of the ADM you see a list of running processes on your connected device
  • run the app with rake device, it will appear in the process list on the left
  • select the com.yourcompany.leaktest process and start the heap update with the second icon above the process list. On the right side, some stats about the current heap state will appear everytime a garbage collection is caused.
  • let the app run for a while and then click on the third icon above the process list, to export the current heap into a file.
  • convert the exported heap file to a format the Eclipse Memory Analyzer can use:
    ~/.rubymotion-android/sdk/platform-tools/hprof-conv /PATH_TO_DUMP/com.yourcompany.leaktest.hprof /PATH_TO_DUMP/com.yourcompany.leaktest-converted.hprof
    
  • open the converted file in Eclipse Memory Analyzer and discard the wizard window. Go to the histogram (second item in the menubar at the center) and enter "leak" in the first line of the list. This will filter to show only objects from the leaktest process If everything goes as it does on my machine, there should be a lot of Item objects, despite having only 2 items in the database.

leak-test's People

Contributors

jhmegorei avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.