In the research to improve the performance of an Android application, memory is central and takes a leading role in the perception of our application by the users, despite being the most ignored aspect by developers during the development process. Every developer should spend some time checking the memory management of the application they are working on: there are many chances for memory leaks. That is why we focused on how Android garbage collection works, what the main causes of memory leaks are, and what a memory churn is.
We defined a lot of best practices to help maintain good memory management, introducing helpful design patterns and analyzing the best choices while developing things taken for granted that can actually affect memory and performance. Then, we looked at the main causes for the worst leaks in Android: those related to main components such as activities and services. As a conclusion for the practices, we introduced APIs both to use and not to use, then, other APIs...