Monday, 4 January 2016

How to detect Android Memory Leak?

Developers engaged in Android application development know how awful security lapse is memory leak.  Memory leak can also create a number of issues in applications. A memory leak probably occurs when storage in heap is created and then not deleted. It is of course a horrible problem in any application.


There are generally two types of memory related errors: out of memory and memory leakage. The first type of memory error tries to allocate memory that the heap of application has. It’s difficult to find leakage. But it can simply be identified once the application begins receiving a crash report. But not all crashes are caused by memory leakages and thus it turns out to be difficult to find memory leakage. If an object is held for a long period even its purpose has finished, memory leakage can occur. However, there is garbage collector collecting data objects, but once application hold these objects, even garbage collector will be useless.

Tools are here to test leaks. Mat plug-in, Eclipse memory analyzer, Valgrind, and Android SDK’s traceview are the names to a few of them. There are two ways offered by Android SDK to outline the memory usage of an application. These include heap dumps and tracker.

Read more : http://goo.gl/u23aDu


No comments:

Post a Comment