(1、 An overview of Java programming is often simply ignored, but a very important problem in itself is the use of memory. Android is mainly written in Java language, so this problem will also occur in Android development. This article does not discuss Java programming issues, but collects such issues in Android, especially in the use of development. Because the author does not touch Android for a long time, if there is any improper description, please correct it. 2、 Android (Java), a common bad code that simply causes memory leaks, is mainly used near embedded devices. Because of some well-known limitations, embedded devices generally do not have very high configurations, especially the memory is relatively limited. If there are too many improper memory uses in the code you write, it will inevitably make your devices run slowly, or even crash. In order to make Android user programs run safely and quickly, each user program of Android will use a proprietary Dalvik virtual machine instance, which is incubated by the Zygote service process, that is, each user program runs in its own process. On the one hand, if a memory leak occurs in the running process of the program, it will only cause its own process to be killed without affecting other processes (if the system process such as system_process has a problem, it will cause the system to restart). On the other hand, Android allocates different memory usage limits for different types of processes. If the memory used by the process exceeds this limit, the system will regard it as a memory leak and then kill it. The maximum memory allocated by Android for using processes is shown below...
Android Memory Leak Debugging Tutorial.pdf
This resource is collected by our Love Open Source IT Information Station.)