当我运行我的应用程序时,它大约是25mb。 但是,当移动另一个活动时,内存增加到80mb。
活动使用的xml位于
之下<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:weightSum="1">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.001">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="45dp"
android:orientation="horizontal"
android:gravity="center|left"
android:background="#23B300"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dp"
android:text="message"
android:textColor="#ffffff"
android:textStyle="bold"
android:textSize="17dp"
/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:gravity="center"
>
<ImageView
android:id="@+id/ivHome"
android:layout_width="120dp"
android:layout_height="20dp"
android:background="@drawable/title_img"
/>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<RelativeLayout
android:id="@+id/msg_delete_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone">
<ImageView
android:id="@+id/delete_logo"
android:layout_width="60dp"
android:layout_height="47dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@drawable/delete_logo"/>
<Button
android:id="@+id/msg_all_delete_btn"
android:layout_width="86dp"
android:layout_height="60dp"
android:background="@drawable/all_delete_msg"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@id/delete_logo"
android:layout_marginTop="12dp"/>
<Button
android:id="@+id/msg_choice_delete_btn"
android:layout_width="85dp"
android:layout_height="60dp"
android:background="@drawable/choice_delete_msg"
android:layout_alignParentTop="true"
android:layout_marginTop="12dp"
android:layout_toRightOf="@id/delete_logo"/>
</RelativeLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/swipe_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/lvMessage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:divider="#d7d7d7"
android:dividerHeight="1dp"/>
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.001">
<include
android:id="@+id/bottom_menu_include"
android:layout_width="match_parent"
android:layout_height="match_parent"
layout="@layout/bottom_menu"
/>
</LinearLayout>
</LinearLayout>
LogCat LeakCanary
D/LeakCanary: In :1.0:1.
D/LeakCanary: * kr.co.message.messageapp.MessageActivity has leaked:
D/LeakCanary: * GC ROOT static android.app.ActivityThread.sCurrentActivityThread
D/LeakCanary: * references android.app.ActivityThread.mActivities
D/LeakCanary: * references android.util.ArrayMap.mArray
D/LeakCanary: * references array java.lang.Object[].[1]
D/LeakCanary: * references android.app.ActivityThread$ActivityClientRecord.activity
D/LeakCanary: * leaks kr.co.message.messageapp.MessageActivity instance
D/LeakCanary: * Retaining: 49 MB.
D/LeakCanary: * Reference Key: 6e957dfc-528f-452e-914e-db5cf80c69cd
D/LeakCanary: * Device: samsung samsung SM-G935S hero2lteskt
D/LeakCanary: * Android Version: 6.0.1 API: 23 LeakCanary: 1.5 00f37f5
D/LeakCanary: * Durations: watch=5021ms, gc=136ms, heap dump=1635ms, analysis=14412ms
D/LeakCanary: * Details:
D/LeakCanary: * Class android.app.ActivityThread
D/LeakCanary: | static SERVICE_DONE_EXECUTING_STOP = 2
D/LeakCanary: | static DEBUG_DUALSCREEN = false
D/LeakCanary: | static THUMBNAIL_FORMAT = android.graphics.Bitmap$Config@1893281640 (0x70d92f68)
D/LeakCanary: | static LOOPER_SLOW_LOOP_WARNING_TIMEOUT = -1
D/LeakCanary: | static MIN_TIME_BETWEEN_GCS = 5000
D/LeakCanary: | static DUAL_SCREEN_TYPE_MAX = 4
D/LeakCanary: | static DEBUG_SERVICE = false
D/LeakCanary: | static DEBUG_PROVIDER = false
D/LeakCanary: | static sThemeSync = java.lang.Object@2002184 (0x7756eaf8)
D/LeakCanary: | static DEBUG_DUALSCREEN_VERBOSE = false
D/LeakCanary: | static sMainThreadHandler = android.app.ActivityThread$H@315306528 (0x12cb3220)
D/LeakCanary: | static sCurrentBroadcastIntent = java.lang.ThreadLocal@2002184 (0x7756ead8)
D/LeakCanary: | static isElasticEnabled = true
D/LeakCanary: | static sFloatingFeature = com.samsung.android.feature.FloatingFeature@2002184 (0x7756eae8)
D/LeakCanary: | static sPackageManager = android.content.pm.IPackageManager$Stub$Proxy@315216048 (0x12c9d0b0)
D/LeakCanary: | static DEBUG_CONFIGURATION = false
D/LeakCanary: | static ONE_COUNT_COLUMN = java.lang.String@1888646 (0x70927728)
D/LeakCanary: | static DEBUG_BROADCAST = false
D/LeakCanary: | static SERVICE_DONE_EXECUTING_START = 1
D/LeakCanary: | static sCSCSync = java.lang.Object@2002184 (0x7756eac0)
D/LeakCanary: | static rCActivShort = null
D/LeakCanary: | static DEBUG_MESSAGES = false
D/LeakCanary: | static mIsWearableHMTSupported = true
D/LeakCanary: | static TWO_COUNT_COLUMNS = java.lang.String@1888646 (0x70927748)
D/LeakCanary: | static DEBUG_BACKUP = false
D/LeakCanary: | static TAG = java.lang.String@1888730 (0x7093bd48)
D/LeakCanary: | static SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003
D/LeakCanary: | static ONE_COUNT_COLUMN_HEADER = java.lang.String@1888647 (0x70927780)
D/LeakCanary: | static LOG_AM_ON_PAUSE_CALLED = 30021
D/LeakCanary: | static HEAP_FULL_COLUMN = java.lang.String@1888646 (0x70927680)
D/LeakCanary: | static $staticOverhead = byte[336]@1895992945 (0x71028e71)
D/LeakCanary: | static SAFE_DEBUG = false
D/LeakCanary: | static LOG_AM_ON_RESUME_CALLED = 30022
D/LeakCanary: | static SERVICE_DONE_EXECUTING_ANON = 0
D/LeakCanary: | static sCurrentActivityThread = android.app.ActivityThread@3147757 (0x12c318b0)
D/LeakCanary: | static sCscFeature = com.sec.android.app.CscFeature@2002184 (0x7756eac8)
D/LeakCanary: | static ACTIVITY_THREAD_CHECKIN_VERSION = 3
D/LeakCanary: | static DEBUG_RESULTS = false
D/LeakCanary: | static THREAD_PRIORITY = -11
D/LeakCanary: | static HEAP_COLUMN = java.lang.String@1888646 (0x70927630)
D/LeakCanary: | static localLOGV = false
D/LeakCanary: | static DEBUG_RC = false
D/LeakCanary: | static DEBUG_MEMORY_TRIM = false
D/LeakCanary: * Instance of android.app.ActivityThread
D/LeakCanary: | static SERVICE_DONE_EXECUTING_STOP = 2
D/LeakCanary: | static DEBUG_DUALSCREEN = false
D/LeakCanary: | static THUMBNAIL_FORMAT = android.graphics.Bitmap$Config@1893281640 (0x70d92f68)
D/LeakCanary: | static LOOPER_SLOW_LOOP_WARNING_TIMEOUT = -1
D/LeakCanary: | static MIN_TIME_BETWEEN_GCS = 5000
D/LeakCanary: | static DUAL_SCREEN_TYPE_MAX = 4
D/LeakCanary: | static DEBUG_SERVICE = false
D/LeakCanary: | static DEBUG_PROVIDER = false
D/LeakCanary: | static sThemeSync = java.lang.Object@2002184 (0x7756eaf8)
D/LeakCanary: | static DEBUG_DUALSCREEN_VERBOSE = false
D/LeakCanary: | static sMainThreadHandler = android.app.ActivityThread$H@315306528 (0x12cb3220)
D/LeakCanary: | static sCurrentBroadcastIntent = java.lang.ThreadLocal@2002184 (0x7756ead8)
D/LeakCanary: | static isElasticEnabled = true
D/LeakCanary: | static sFloatingFeature = com.samsung.android.feature.FloatingFeature@2002184 (0x7756eae8)
D/LeakCanary: | static sPackageManager = android.content.pm.IPackageManager$Stub$Proxy@315216048 (0x12c9d0b0)
D/LeakCanary: | static DEBUG_CONFIGURATION = false
D/LeakCanary: | static ONE_COUNT_COLUMN = java.lang.String@1888646 (0x70927728)
D/LeakCanary: | static DEBUG_BROADCAST = false
D/LeakCanary: | static SERVICE_DONE_EXECUTING_START = 1
D/LeakCanary: | static sCSCSync = java.lang.Object@2002184 (0x7756eac0)
D/LeakCanary: | static rCActivShort = null
D/LeakCanary: | static DEBUG_MESSAGES = false
D/LeakCanary: | static mIsWearableHMTSupported = true
D/LeakCanary: | static TWO_COUNT_COLUMNS = java.lang.String@1888646 (0x70927748)
D/LeakCanary: | static DEBUG_BACKUP = false
D/LeakCanary: | static TAG = java.lang.String@1888730 (0x7093bd48)
D/LeakCanary: | static SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003
D/LeakCanary: | static ONE_COUNT_COLUMN_HEADER = java.lang.String@1888647 (0x70927780)
D/LeakCanary: | static LOG_AM_ON_PAUSE_CALLED = 30021
D/LeakCanary: | static HEAP_FULL_COLUMN = java.lang.String@1888646 (0x70927680)
D/LeakCanary: | static $staticOverhead = byte[336]@1895992945 (0x71028e71)
D/LeakCanary: | static SAFE_DEBUG = false
D/LeakCanary: | static LOG_AM_ON_RESUME_CALLED = 30022
D/LeakCanary: | static SERVICE_DONE_EXECUTING_ANON = 0
D/LeakCanary: | static sCurrentActivityThread = android.app.ActivityThread@3147757 (0x12c318b0)
D/LeakCanary: | static sCscFeature = com.sec.android.app.CscFeature@2002184 (0x7756eac8)
D/LeakCanary: | static ACTIVITY_THREAD_CHECKIN_VERSION = 3
D/LeakCanary: | static DEBUG_RESULTS = false
D/LeakCanary: | static THREAD_PRIORITY = -11
D/LeakCanary: | static HEAP_COLUMN = java.lang.String@1888646 (0x70927630)
D/LeakCanary: | static localLOGV = false
D/LeakCanary: | static DEBUG_RC = false
D/LeakCanary: | static DEBUG_MEMORY_TRIM = false
D/LeakCanary: | defaultHeapUtil = 0.0
D/LeakCanary: | mActivities = android.util.ArrayMap@3153065 (0x12cb3240)
D/LeakCanary: | mAllApplications = java.util.ArrayList@3153067 (0x12cb3320)
D/LeakCanary: | mAppThread = android.app.ActivityThread$ApplicationThread@315306496 (0x12cb3200)
D/LeakCanary: | mAvailThumbnailBitmap = null
D/LeakCanary: | mBackupAgents = android.util.ArrayMap@3153068 (0x12cb3340)
D/LeakCanary: | mBoundApplication = android.app.ActivityThread$AppBindData@315363424 (0x12cc1060)
D/LeakCanary: | mCSCIconMap = android.util.ArrayMap@3162428 (0x12d97ba0)
D/LeakCanary: | mCSCStringMap = android.util.ArrayMap@3162428 (0x12d97bc0)
D/LeakCanary: | mCompatConfiguration = android.content.res.Configuration@3152744 (0x12cab500)
D/LeakCanary: | mCompatConfigurations = com.samsung.android.multidisplay.common.UnRestrictedArrayList@3153066 (0x12cb32c0)
D/LeakCanary: | mConfiguration = android.content.res.Configuration@3152743 (0x12cab480)
D/LeakCanary: | mConfigurations = com.samsung.android.multidisplay.common.UnRestrictedArrayList@3153066 (0x12cb32a0)
D/LeakCanary: | mCoreFeatureClassLoader = null
D/LeakCanary: | mCoreSettings = android.os.Bundle@3152087 (0x12c9b400)
D/LeakCanary: | mCurDefaultDisplayDpi = 640
D/LeakCanary: | mCurDefaultDisplayDpis = com.samsung.android.multidisplay.common.UnRestrictedArrayList@3153066 (0x12cb3280)
D/LeakCanary: | mDensityCompatMode = false
D/LeakCanary: | mGcIdler = android.app.ActivityThread$GcIdler@315054576 (0x12c759f0)
D/LeakCanary: | mGcIdlerScheduled = false
D/LeakCanary: | mH = android.app.ActivityThread$H@315306528 (0x12cb3220)
D/LeakCanary: | mInitialApplication = .MemoryLeakApplication@315398032 (0x12cc9790)
D/LeakCanary: | mInitialApplications = android.app.Application[4]@315306752 (0x12cb3300)
D/LeakCanary: | mInstrumentation = android.app.Instrumentation@3152606 (0x12ca7ec0)
D/LeakCanary: | mInstrumentationAppDir = null
D/LeakCanary: | mInstrumentationLibDir = null
D/LeakCanary: | mInstrumentationPackageName = null
D/LeakCanary: | mInstrumentationSplitAppDirs = null
D/LeakCanary: | mInstrumentedAppDir = null
D/LeakCanary: | mInstrumentedLibDir = null
D/LeakCanary: | mInstrumentedSplitAppDirs = null
D/LeakCanary: | mJitEnabled = true
D/LeakCanary: | mLastAssistStructure = null
D/LeakCanary: | mLastIntendedActivityToken = android.os.BinderProxy@3167808 (0x12e1b120)
D/LeakCanary: | mLocalProviders = android.util.ArrayMap@3153070 (0x12cb3400)
D/LeakCanary: | mLocalProvidersByName = android.util.ArrayMap@3153070 (0x12cb3420)
D/LeakCanary: | mLooper = android.os.Looper@3153064 (0x12cb31c0)
D/LeakCanary: | mMainThreadConfig = android.content.res.Configuration@3152742 (0x12cab400)
D/LeakCanary: | mNewActivities = null
D/LeakCanary: | mNumVisibleActivities = 1
D/LeakCanary: | mOnPauseListeners = android.util.ArrayMap@3153070 (0x12cb3440)
D/LeakCanary: | mPackages = android.util.ArrayMap@3153068 (0x12cb3360)
D/LeakCanary: | mPendingConfiguration = null
D/LeakCanary: | mPendingConfigurations = com.samsung.android.multidisplay.common.UnRestrictedArrayList@3153067 (0x12cb32e0)
D/LeakCanary: | mPrevScreenOrientationDefined = false
D/LeakCanary: | mProfiler = android.app.ActivityThread$Profiler@315307424 (0x12cb35a0)
D/LeakCanary: | mProviderMap = android.util.ArrayMap@3153069 (0x12cb33c0)
D/LeakCanary: | mProviderRefCountMap = android.util.ArrayMap@3153069 (0x12cb33e0)
D/LeakCanary: | mRelaunchingActivities = java.util.ArrayList@3153069 (0x12cb33a0)
D/LeakCanary: | mResourcePackages = android.util.ArrayMap@3153068 (0x12cb3380)
D/LeakCanary: | mResourcesManager = android.app.ResourcesManager@3152832 (0x12cad700)
D/LeakCanary: | mServices = android.util.ArrayMap@3153065 (0x12cb3260)
D/LeakCanary: | mShrinkRequested = false
D/LeakCanary: | mSomeActivitiesChanged = true
D/LeakCanary: | mSystemContext = android.app.ContextImpl@3148245 (0x12c3d790)
D/LeakCanary: | mSystemThread = false
D/LeakCanary: | mTempConfigurationForSelectiveOrientation = null
D/LeakCanary: | mThemeAppIconMap = null
D/LeakCanary: | mThumbnailCanvas = null
D/LeakCanary: | mThumbnailHeight = -1
D/LeakCanary: | mThumbnailWidth = -1
D/LeakCanary: | shadow$klass = android.app.ActivityThread
D/LeakCanary: | shadow$monitor = 0
D/LeakCanary: * Instance of android.util.ArrayMap
D/LeakCanary: | static EMPTY = android.util.ArrayMap@1893271 (0x70d90750)
D/LeakCanary: | static BASE_SIZE = 4
D/LeakCanary: | static DEBUG = false
D/LeakCanary: | static EMPTY_IMMUTABLE_INTS = int[0]@1893266384 (0x70d8f3d0)
D/LeakCanary: | static mBaseCacheSize = 1
D/LeakCanary: | static CACHE_SIZE = 10
D/LeakCanary: | static mBaseCache = java.lang.Object[8]@314954080 (0x12c5d160)
D/LeakCanary: | static mTwiceBaseCacheSize = 1
D/LeakCanary: | static mTwiceBaseCache = java.lang.Object[16]@314995184 (0x12c671f0)
D/LeakCanary: | static $staticOverhead = byte[80]@1895846209 (0x71005141)
D/LeakCanary: | static TAG = java.lang.String@1889961 (0x70a68728)
D/LeakCanary: | mArray = java.lang.Object[8]@314605040 (0x12c07df0)
D/LeakCanary: | mCollections = null
D/LeakCanary: | mHashes = int[4]@315165344 (0x12c90aa0)
D/LeakCanary: | mSize = 2
D/LeakCanary: | shadow$klass = android.util.ArrayMap
D/LeakCanary: | shadow$monitor = 0
D/LeakCanary: * Array of java.lang.Object[]
D/LeakCanary: | [0] = android.os.BinderProxy@3167808 (0x12e1b120)
D/LeakCanary: | [1] = android.app.ActivityThread$ActivityClientRecord@315035264 (0x12c70e80)
D/LeakCanary: | [2] = android.os.BinderProxy@3153076 (0x12cb36a0)
D/LeakCanary: | [3] = android.app.ActivityThread$ActivityClientRecord@315275392 (0x12cab880)
D/LeakCanary: | [4] = null
D/LeakCanary: | [5] = null
D/LeakCanary: | [6] = null
D/LeakCanary: | [7] = null
D/LeakCanary: * Instance of android.app.ActivityThread$ActivityClientRecord
D/LeakCanary: | activity = .MessageActivity@315311648 (0x12cb4620)
D/LeakCanary: | activityInfo = android.content.pm.ActivityInfo@3150321 (0x12c70280)
D/LeakCanary: | compatInfo = android.content.res.CompatibilityInfo@3167812 (0x12e1b2e0)
D/LeakCanary: | createdConfig = null
D/LeakCanary: | displayId = 0
D/LeakCanary: | embeddedID = null
D/LeakCanary: | hideForNow = false
D/LeakCanary: | ident = 245800388
D/LeakCanary: | intent = android.content.Intent@3152927 (0x12cafc40)
D/LeakCanary: | isForward = true
D/LeakCanary: | lastNonConfigurationInstances = null
D/LeakCanary: | mPendingRemoveWindow = null
D/LeakCanary: | mPendingRemoveWindowManager = null
D/LeakCanary: | multiWindowStyle = com.samsung.android.multiwindow.MultiWindowStyle@3160733 (0x12d6e580)
D/LeakCanary: | newConfig = null
D/LeakCanary: | nextIdle = null
D/LeakCanary: | onlyLocalRequest = false
D/LeakCanary: | overrideConfig = android.content.res.Configuration@3150344 (0x12c70b80)
D/LeakCanary: | packageInfo = android.app.LoadedApk@3152868 (0x12cae510)
D/LeakCanary: | parent = null
D/LeakCanary: | paused = false
D/LeakCanary: | pendingConfigChanges = 0
D/LeakCanary: | pendingIntents = null
D/LeakCanary: | pendingResults = null
D/LeakCanary: | persistentState = null
D/LeakCanary: | profilerInfo = null
D/LeakCanary: | referrer = java.lang.String@3152985 (0x12cb12e0)
D/LeakCanary: | startsNotResumed = false
D/LeakCanary: | state = null
D/LeakCanary: | stopped = false
D/LeakCanary: | tmpConfig = android.content.res.Configuration@3150563 (0x12c76100)
D/LeakCanary: | token = android.os.BinderProxy@3167808 (0x12e1b120)
D/LeakCanary: | voiceInteractor = null
D/LeakCanary: | window = com.android.internal.policy.PhoneWindow@3157129 (0x12d165d0)
D/LeakCanary: | shadow$klass = android.app.ActivityThread$ActivityClientRecord
D/LeakCanary: | shadow$monitor = -2119825702
D/LeakCanary: * Instance of .MessageActivity
D/LeakCanary: | bottom_menu_check = android.support.v7.widget.AppCompatImageButton@3172280 (0x12e88400)
D/LeakCanary: | bottom_menu_etc = android.support.v7.widget.AppCompatImageButton@3172331 (0x12e89800)
D/LeakCanary: | bottom_menu_home = android.support.v7.widget.AppCompatImageButton@3172259 (0x12e87c00)
D/LeakCanary: | bottom_menu_message = android.support.v7.widget.AppCompatImageButton@3146229 (0x12c0c400)
D/LeakCanary: | bottom_menu_vip = android.support.v7.widget.AppCompatImageButton@3170990 (0x12e68c00)
D/LeakCanary: | context = .MessageActivity@315311648 (0x12cb4620)
D/LeakCanary: | db = android.database.sqlite.SQLiteDatabase@3152782 (0x12cac3c0)
D/LeakCanary: | dbHelper = .DBHelper@315231776 (0x12ca0e20)
D/LeakCanary: | intent = null
D/LeakCanary: | isDeleteMode = false
D/LeakCanary: | ivHome = android.support.v7.widget.AppCompatImageView@3171891 (0x12e7ec00)
D/LeakCanary: | ivNewMessage = android.support.v7.widget.AppCompatImageView@3169351 (0x12e40c00)
D/LeakCanary: | long_check = false
D/LeakCanary: | lvMessage = android.widget.ListView@3173376 (0x12ea3000)
D/LeakCanary: | mAllDeleteBtn = android.support.v7.widget.AppCompatButton@3171932 (0x12e7fc00)
D/LeakCanary: | mButtomMenu = .Util.BottomMenu@315134912 (0x12c893c0)
D/LeakCanary: | mChoiceDeleteBtn = android.support.v7.widget.AppCompatButton@3171747 (0x12e7b400)
D/LeakCanary: | mDeleteLayout = android.widget.RelativeLayout@3171911 (0x12e7f400)
D/LeakCanary: | mDeleteMsgList = java.util.ArrayList@3151368 (0x12c89b80)
D/LeakCanary: | messageListItem_arr = java.util.ArrayList@3151369 (0x12c89ba0)
D/LeakCanary: | messageListViewAdapter = .MessageListViewAdapter@315137408 (0x12c89d80)
D/LeakCanary: | swipeRefreshLayout = android.support.v4.widget.SwipeRefreshLayout@3171942 (0x12e80000)
D/LeakCanary: | mDelegate = android.support.v7.app.AppCompatDelegateImplV23@3196163 (0x130cf540)
D/LeakCanary: | mEatKeyUpEvent = false
D/LeakCanary: | mResources = null
D/LeakCanary: | mThemeId = 2131296509
D/LeakCanary: | mCreated = true
D/LeakCanary: | mFragments = android.support.v4.app.FragmentController@3162489 (0x12d99390)
D/LeakCanary: | mHandler = android.support.v4.app.FragmentActivity$1@316673568 (0x12e00e20)
D/LeakCanary: | mMediaController = null
D/LeakCanary: | mNextCandidateRequestIndex = 0
D/LeakCanary: | mOptionsMenuInvalidated = false
D/LeakCanary: | mPendingFragmentActivityResults = android.support.v4.util.SparseArrayCompat@3167968 (0x12e1ef80)
D/LeakCanary: | mReallyStopped = false
D/LeakCanary: | mRequestedPermissionsFromFragment = false
D/LeakCanary: | mResumed = true
D/LeakCanary: | mRetaining = false
D/LeakCanary: | mStopped = false
D/LeakCanary: | mStartedActivityFromFragment = false
D/LeakCanary: | mStartedIntentSenderFromFragment = false
D/LeakCanary: | DEBUG_ELASTIC = true
D/LeakCanary: | isElasticEnabled = true
D/LeakCanary: | mActionBar = null
D/LeakCanary: | mActionModeTypeStarting = 0
D/LeakCanary: | mActivityInfo = android.content.pm.ActivityInfo@3150321 (0x12c70280)
D/LeakCanary: | mActivityTransitionState = android.app.ActivityTransitionState@3178958 (0x12f2b4c0)
D/LeakCanary: | mApplication = .MemoryLeakApplication@315398032 (0x12cc9790)
D/LeakCanary: | mCalled = true
D/LeakCanary: | mChangeCanvasToTranslucent = false
D/LeakCanary: | mChangingConfigurations = false
D/LeakCanary: | mComponent = android.content.ComponentName@3170264 (0x12e57070)
D/LeakCanary: | mConfigChangeFlags = 0
D/LeakCanary: | mCurrentConfig = android.content.res.Configuration@3149849 (0x12c64a00)
D/LeakCanary: | mDecor = com.android.internal.policy.PhoneWindow$DecorView@317175808 (0x12e7b800)
D/LeakCanary: | mDefaultKeyMode = 0
D/LeakCanary: | mDefaultKeySsb = null
D/LeakCanary: | mDestroyed = false
D/LeakCanary: | mDoReportFullyDrawn = false
D/LeakCanary: | mEmbeddedID = null
D/LeakCanary: | mEnableDefaultActionBarUp = false
D/LeakCanary: | mEnterTransitionListener = android.app.SharedElementCallback$1@1893266640 (0x70d8f4d0)
D/LeakCanary: | mExitTransitionListener = android.app.SharedElementCallback$1@1893266640 (0x70d8f4d0)
D/LeakCanary: | mExpandRequestListener = null
D/LeakCanary: | mFeatureContextMenuListener = android.app.Activity$FeatureContextMenuListener@316248880 (0x12d99330)
D/LeakCanary: | mFinished = false
D/LeakCanary: | mFlipfont = 0
D/LeakCanary: | mFragments = android.app.FragmentController@3162489 (0x12d99360)
D/LeakCanary: | mHandler = android.os.Handler@3166733 (0x12e00d60)
D/LeakCanary: | mHasCurrentPermissionsRequest = false
D/LeakCanary: | mIdent = 245800388
D/LeakCanary: | mInjectionManager = android.app.im.InjectionManager@3168093 (0x12e22070)
D/LeakCanary: | mInstanceTracker = android.os.StrictMode$InstanceTracker@316248944 (0x12d99370)
D/LeakCanary: | mInstrumentation = android.app.Instrumentation@3152606 (0x12ca7ec0)
D/LeakCanary: | mIntent = android.content.Intent@3152927 (0x12cafc40)
D/LeakCanary: | mLastNonConfigurationInstances = null
D/LeakCanary: | mLauncherBooster = null
D/LeakCanary: | mMainThread = android.app.ActivityThread@3147757 (0x12c318b0)
D/LeakCanary: | mManagedCursors = java.util.ArrayList@3166734 (0x12e00da0)
D/LeakCanary: | mManagedDialogs = null
D/LeakCanary: | mMenuInflater = null
D/LeakCanary: | mMultiWindowStyle = com.samsung.android.multiwindow.MultiWindowStyle@3152673 (0x12ca9940)
D/LeakCanary: | mParent = null
D/LeakCanary: | mPolicyManager = null
D/LeakCanary: | mPreferredOrientation = 1
D/LeakCanary: | mPreventEmbeddedTabs = false
D/LeakCanary: | mReferrer = java.lang.String@3152985 (0x12cb12e0)
D/LeakCanary: | mResultCode = 0
D/LeakCanary: | mResultData = null
D/LeakCanary: | mResumed = true
D/LeakCanary: | mScreenChangeListener = null
D/LeakCanary: | mSearchEvent = null
D/LeakCanary: | mSearchManager = null
D/LeakCanary: | mShrinkRequestListener = null
D/LeakCanary: | mStackedHeight = -1
D/LeakCanary: | mStartedActivity = false
D/LeakCanary: | mStopped = false
D/LeakCanary: | mSubDecor = null
D/LeakCanary: | mSubWindow = null
D/LeakCanary: | mSubWindowAdded = false
D/LeakCanary: | mSubWindowDummpy = com.android.internal.policy.PhoneWindow@3157118 (0x12d16180)
D/LeakCanary: | mTemporaryPause = false
D/LeakCanary: | mTitle = java.lang.String@3161478 (0x12d80880)
D/LeakCanary: | mTitleColor = 0
D/LeakCanary: | mTitleReady = true
D/LeakCanary: | mToken = android.os.BinderProxy@3167808 (0x12e1b120)
D/LeakCanary: | mTranslucentCallback = null
D/LeakCanary: | mUiThread = java.lang.Thread@2001924 (0x7752efb8)
D/LeakCanary: | mVisibleBehind = false
D/LeakCanary: | mVisibleFromClient = true
D/LeakCanary: | mVisibleFromServer = true
D/LeakCanary: | mVoiceInteractor = null
D/LeakCanary: | mWindow = com.android.internal.policy.PhoneWindow@3157129 (0x12d165d0)
D/LeakCanary: | mWindowAdded = true
D/LeakCanary: | mWindowManager = android.view.WindowManagerImpl@3167953 (0x12e1e9e0)
D/LeakCanary: | myName = java.lang.String@3150350 (0x12c70d80)
D/LeakCanary: | mInflater = com.android.internal.policy.PhoneLayoutInflater@3152686 (0x12ca9e20)
D/LeakCanary: | mOverrideConfiguration = null
D/LeakCanary: | mResources = android.content.res.Resources@3157455 (0x12d1e4f0)
D/LeakCanary: | mTheme = android.content.res.Resources$Theme@316796192 (0x12e1ed20)
D/LeakCanary: | mThemeResource = 2131296509
D/LeakCanary: | mBase = android.app.ContextImpl@3196160 (0x130cf420)
D/LeakCanary: | shadow$klass = .MessageActivity
D/LeakCanary: | shadow$monitor = -2126866654
D/LeakCanary: * Excluded Refs:
D/LeakCanary: | Field: android.view.inputmethod.InputMethodManager.mNextServedView
D/LeakCanary: | Field: android.view.inputmethod.InputMethodManager.mServedView
D/LeakCanary: | Field: android.view.inputmethod.InputMethodManager.mServedInputConnection
D/LeakCanary: | Field: android.view.inputmethod.InputMethodManager.mCurRootView
D/LeakCanary: | Field: android.os.UserManager.mContext
D/LeakCanary: | Field: android.net.ConnectivityManager.sInstance
D/LeakCanary: | Field: android.view.Choreographer$FrameDisplayEventReceiver.mMessageQueue (always)
D/LeakCanary: | Thread:FinalizerWatchdogDaemon (always)
D/LeakCanary: | Thread:main (always)
D/LeakCanary: | Thread:LeakCanary-Heap-Dump (always)
D/LeakCanary: | Class:java.lang.ref.WeakReference (always)
D/LeakCanary: | Class:java.lang.ref.SoftReference (always)
D/LeakCanary: | Class:java.lang.ref.PhantomReference (always)
D/LeakCanary: | Class:java.lang.ref.Finalizer (always)
D/LeakCanary: | Class:java.lang.ref.FinalizerReference (always)
答案 0 :(得分:0)
我解决了这个问题。
问题是活动布局中的背景资源
原因======================================= 后台资源文件分辨率为482 * 290
但图像路径是可绘制的
所以我的手机dpi是xxxhdpi(mdpi * 4)
查看Allocation Tracking
中的byte [] size 8998912482 * 4(mdpi * 4) * 290 * 4(mdpi * 4) * 4(ARGB_888 takes 4 Bytes) = 8998912
参考网站:http://gokhanarik.com/android-background-image-high-memory-usage-issue/
我知道内存大小增加的原因,但我不知道为什么没有调用GC。
如果你知道请告诉我原因..