0

I have an app that is doing a lot of work related to Bluetooth connection and displaying graphs etc. App is using many libraries as well. App has also a background service running all the time. Now I noticed that it is taking upto 500 Mbs of Memory Usage. What I have done was commented out. Everything on app launch and just showed splash screen (custom made) and still footprints are 60-70 Mbs. That means something is taking too much memory without even using it.

One important thing is that Android Studio's Memory Monitor is showing me that app is using only 40-50 Mbs whereas my phone's Memory manager is showing upto 500 MBs. I have tested this on 3 phones. Result remains same.

Any help should be appreciable.

Stephen
  • 9,899
  • 16
  • 90
  • 137
Fahid Nadeem
  • 412
  • 2
  • 7
  • 19

2 Answers2

0

Use MAT Tool to find out memory leakage and resolve that.

Once started service, if it is no needed then stop the service using intent.

And also check you have started any timer thread and not stopped it.

Community
  • 1
  • 1
Stephen
  • 9,899
  • 16
  • 90
  • 137
0

You are leaking alot of memory you can go to memory monitor in android studio and use garbage collector to have an estimation of the total amount of leak you're having.

Most of the time External libraries are main Issue for the memory leakage due to their differing implementations and are quite inefficient when used for work on mobile client.

Here is a great blog regarding memory leakage.

http://blog.nimbledroid.com/2016/05/23/memory-leaks.html

Haris ali
  • 773
  • 1
  • 13
  • 19