Native heap size of my application keeps increasing and finally crashes.
I have a couple of list views in my application and it is being populated from the database.
In the lisview, there are images and I have soft references to the bitmap image that is being loaded into the listview.
I also have option to view my application in different languages – English and Hindi.Whenever the user changes the language, I reload my application and this is increasing native heap size even though I have set FLAG_CLEAR_TOP and the activities are destroyed.I also set the locale when the language is changed.
I have also made sure all the lists are cleared when activities are destroyed.
You have to double check the ways you control your connections and data that you retrieve and keep in your application.
You have a Memory Leak in your application and it’s kinda hard to catch it.The best you can do is that cleaning all your background cache and closing the connections whenever you do a major operation which will affect or restart the application.