I find it difficult to find a possible memory leak. I have an Activity that does the hard work in the background.
After some tasks, the application consumes too much memory. It seems that it is not being cleaned properly.
This action is in default state:

If I run the task performed by the Activity, more and more memory is allocated.
Activity after some work: 
At first, I thought it was a memory problem, because the GC cannot properly free the memory. As far as I know, GC can free memory if references to objects are missing. It is right?
Now comes the part that bothers me:
If I start GC from Android Studio, the memory is cleared properly and my activity never closes. I just need to use Android Studio GC when a lot of memory is allocated. 
This I mean:

In general, the question is:
Why can Android Studio GC properly clear the memory and why it does not work properly with the automatic android GC?
I know this is a pretty general question. I just want to know if there are different types of garbage collectors or something like that.
Also call System.gc(); Does not clear memory properly.
Additional Information:
Moto G 2nd gen
Android 5.0.2.
java garbage-collection android
Flanschiox
source share