- Expert Android Programming
- Prajyot Mainkar
- 251字
- 2021-07-08 10:29:07
Memory Monitor
When you hear the term memory management in an Android app, it is basically the Random Access Memory (RAM). Managing the RAM is the most critical section in the Android app development process, as the physical memory is often constrained. The fundamental principle of memory management is to avoid a memory leak from your app.
In Android Studio there is a tool we can use to check the memory usage in the App. To check this you could follow these steps:
- Run your app on an Android device connected to an emulator.
- Open the Android Monitor tab in Android Studio situated at the bottom window.
- Open the Monitor section within it, and you are there.
Here you'll be able to continuously check the memory usage of the app as and when the app is being used. The following image shows the memory usage for an app:

The preceding memory graph shows the memory used by a device against time. This graph shows the memory usage in the app when any process is performed by the app, be it loading data over the network, displaying an image, rendering a view on the screen, or running a background task.
There are two graphs being plotted at the same time here, one with the allocated memory that could be used by the device.
<p>OutOfMemoryException error is the most common cause of unconventional crashing of an app due to memory leaks, and the Memory Monitor tool can help you to debug the same.
- Web前端開發技術:HTML、CSS、JavaScript(第3版)
- C#程序設計實訓指導書
- Visual C++串口通信開發入門與編程實踐
- C#編程入門指南(上下冊)
- Java Web應用開發技術與案例教程(第2版)
- 區塊鏈底層設計Java實戰
- jQuery Mobile移動應用開發實戰(第3版)
- Java程序設計入門
- Programming with CodeIgniterMVC
- 現代C++編程實戰:132個核心技巧示例(原書第2版)
- Scratch趣味編程:陪孩子像搭積木一樣學編程
- Qt5 C++ GUI Programming Cookbook
- Arduino Wearable Projects
- Arduino機器人系統設計及開發
- Building UIs with Wijmo