【发布时间】:2017-09-22 04:06:17
【问题描述】:
当我打开此活动时,分配的内存从 11MB 变为近 50MB..
在这个活动中,我只有一个带有图像的框架布局。我使用 onTouchEvent 移动点图像。
谁能告诉我为什么我要使用这么多内存?即使当我按下返回按钮离开活动时,分配的内存仍然是 50MB
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/fl"
tools:context="it.uniroma3.sensorlog">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@mipmap/mappa"
android:id="@+id/map"/>
<ImageView
android:layout_width="10dp"
android:layout_height="10dp"
android:src="@android:drawable/ic_notification_overlay"
android:id="@+id/dot"
/>
</FrameLayout>
【问题讨论】:
标签: java android performance memory-management