I know that there are 2-3 topic about this, there were problems with FinalizerReference
, but it's still not explained well. I have a question about this class and how do things in it work.
No matter what I do in my app, FinalizerReference
always keep 5-10 RAM
for itself, and my question is:
is this a normal behavior that I don't have to worry about?
As I know, Java objects are freed, but 'pointers' stay in the memory and they're cleaned with the next GC (aswell as normal objects cleaned with GC, with no reference to it).
For me, this is a little bit wrong, because if I have ~64 MB's of RAM to use with my application and 10mb are wasted - there must be an issue.
I checked it all, removed all the leaks I had and currently my app just stays at 18~mb RAM (7 RAM - graphics, 2 RAM - Objects). The rest - FinalizerReference
;/
Here's a screenshot from the AppHeap:
here's a screen from it's instances:
and here's my memory monitor (it stays in this form for 30 minutes):
Also, in the 'Instances' panel, there are 50 entries including ~5 from my code and libraries I use. The rest is from Android - InputManagers, Parcels, Proxies etc.
Edit
This happens on Galaxy S5. On Android Emulator I get ~2MB from FinalizerReference