I have some memory problems about my android appwiget, (It's small toy appwidget based drawable animation repeat)
So I watched my memory viewer in Android Studio.
I found my app's memory increased at initial time, but when it doesn't enough memory it automatically release some memory.
I want to know what android function make this.
Can I control this release function with java code?
*I tested at real device android ver 4.42
You are talking about Garbage Collection, which is the process of removing from the memory the objects that are no longer required. You can have a good idea of how it works in Java here.
In Android (and Java in general) you can suggest the virtual machine to do it with the System.gc() call. Note, though, that it:
Indicates to the VM that it would be a good time to run the garbage collector. Note that this is a hint only. There is no guarantee that the garbage collector will actually be run.