摘要
Android应用程序的主体采用Java编程语言实现,Java语言的一个显著特点是它通过Java虚拟机和垃圾回收机制管理大部分的内存事务,但是在Java程序中不可避免地存在着内存泄漏的问题。本文从造成Android应用程序内存泄漏的原因入手,对内存泄漏进行检测和定位。阐述了在编写应用程序时规避内存泄漏的方法,并分别介绍了一种内存监测工具和一种内存分析工具的使用方法。
Main part of Android application program is realized using Java programming language. A outstanding feature of Java language is that most memory transactions are managed through Java virtual machine and garbage collection mechanism, But there is inevitable memory leak problem in Java program. In this paper, the reasons of Android application memory leak are analyzed, and memory leak is detected and located. How to avoid memory leak when compiling application program is introduced, and use methods of a memory monito- ring tool and a memory analysis tool are given.
出处
《单片机与嵌入式系统应用》
2012年第6期4-6,共3页
Microcontrollers & Embedded Systems