2

I was testing an Android application for memory leakage. But I have no idea How to test memory leakage in the application. And How would I know that app has memory leakage problem?

1
  • Why is this tagged iOS? Do you need an answer for iOS applications too?
    – user246
    Commented Nov 9, 2016 at 14:56

3 Answers 3

1

It is hard, if not possible, to test memory leak with manual testing. Even if you can catch it, you can not prove it.

  • With a memory leak, an application will run slower and slower, consuming more and more memory.

We need to catch memory leak with tools, depends on which platform you are testing on, there are multiple options to choose from. Check out links below:

Memory analysis for Android applications

Eclipse memory analysis tool

1

Same question asked in stack-overflow [SO]. Please refer this.

There are some tool as well Valgrind, Quick Start Guide here.

Basically memory leakage happen more likely when you hold an Object, long after its purpose has been served.

0

When using android studio, here's how you check for memory leaks these days:

https://developer.android.com/studio/profile/investigate-ram.html

  1. Start your app on a connected device or emulator.
  2. Select View > Tool Windows > Android Monitor.
  3. In the upper-left corner of Android Monitor, select the Monitors tab.

You may need to connect your device to your PC and run the application in debug mode. That means you will need to check out the source code as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.