Memory leak testing of mobile app

Is there a black box testing method to check if a mobile app is leaking memory?

On Android you can use Memory section in Settings. Use app for a bit and then check memory usage for it in settings. If it looks way higher than it should compared to other apps of similar complexity, then there are probably memory leaks. For example, I’ve had a case where an light-weighted app used almost 1.5GB of RAM, which is obviously due to leaks since most other apps use up to 150MB and Android system uses around 800MB. After fixing leaks it now uses around 50MB.

Keep in mind that there are always small leaks in apps and system itself, but they’re usually not important since they have little to no effect on performance. So you’re just looking for ones that drastically increase memory usage because filling out memory has impact on performance and often causes app to crash if there is not enough free memory.

As far as I know iOS doesn’t have built-in option to check RAM memory usage, so maybe some aftermarket RAM monitoring app can be used there (if there are any).

Of course, it would be best to have developers check for memory leaks since they have tools for that, for example Memory Profiler in Android Studio.

3 Likes