2

i found a memory leaks in my android app

and when i used leakcanary library

its gave me this error but i dont know what exactly making this error

so ... the error title was .. FrameLayout leaked

and the Error was in a Fragment called

SentFragment.view

and the error is

* Instance of com.e7kyy.e7kyy.Fragments.SentFragment
| mAdapter = com.e7kyy.e7kyy.Fragments.SentFragment$1@321628672 (0x132baa00)
| mAuth = com.google.firebase.auth.internal.zzj@315228480 (0x12ca0140)
| mBanner = com.google.android.gms.ads.AdView@319033344 (0x13041000)
| mDb = com.google.firebase.database.DatabaseReference@321575904 (0x132adbe0)
| mId = "CN2OaNldF8ReuvkV5KrTjpD1KwU2"
| mInterstitialAd = null
| mNullUsers = android.support.v7.widget.AppCompatTextView@319249408 (0x13075c00)
| mRecyclerView = android.support.v7.widget.RecyclerView@319257600 (0x13077c00)
| mUser = com.google.firebase.database.DatabaseReference@321626944 (0x132ba340)
| view = android.widget.FrameLayout@319031296 (0x13040800)
| mAdded = false
| mAnimationInfo = null
| mArguments = null
| mBackStackNesting = 2
| mCalled = true
| mChildFragmentManager = android.support.v4.app.FragmentManagerImpl@316844400 (0x12e2a970)
| mChildNonConfig = null
| mContainer = null
| mContainerId = 2131230865
| mDeferStart = false
| mDetached = false
| mFragmentId = 2131230865
| mFragmentManager = android.support.v4.app.FragmentManagerImpl@315234336 (0x12ca1820)
| mFromLayout = false
| mHasMenu = false
| mHidden = false
| mHiddenChanged = false
| mHost = android.support.v4.app.FragmentActivity$HostCallbacks@315448448 (0x12cd5c80)
| mInLayout = false
| mIndex = 0
| mInnerView = null
| mIsCreated = true
| mIsNewlyAdded = false
| mLayoutInflater = com.android.internal.policy.PhoneLayoutInflater@318294720 (0x12f8cac0)
| mLifecycleRegistry = android.arch.lifecycle.LifecycleRegistry@318050048 (0x12f50f00)
| mMenuVisible = true
| mParentFragment = null
| mPerformedCreateView = false
| mPostponedAlpha = 0.0
| mRemoving = true
| mRestored = false
| mRetainInstance = false
| mRetaining = false
| mSavedFragmentState = null
| mSavedViewState = android.util.SparseArray@321629312 (0x132bac80)
| mState = 1
| mTag = null
| mTarget = null
| mTargetIndex = -1
| mTargetRequestCode = 0
| mUserVisibleHint = true
| mView = null
| mViewModelStore = android.arch.lifecycle.ViewModelStore@318487968 (0x12fbbda0)
| mWho = "android:fragment:0"
| shadow$_klass_ = com.e7kyy.e7kyy.Fragments.SentFragment
| shadow$_monitor_ = 0

so how can i know where is the error

or at least what is causing it

thank u :)

2
  • Check the chain of reference which caused the issue instead of looking into one reference! Feb 20, 2019 at 7:22
  • My problem was when I used FragmentManager from Activity instead of .getChildFragmentManager() proandroiddev.com/… Jul 29, 2019 at 11:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.