Coder Social home page Coder Social logo

Comments (12)

yjfnypeu avatar yjfnypeu commented on May 21, 2024

哪里内存泄漏了?

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024

image

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024

应该是Dialog持有引用没有及时释放导致的

from updateplugin.

yjfnypeu avatar yjfnypeu commented on May 21, 2024

能发发具体的泄漏信息吗?

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024

方便邮箱? 我发给你

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024
In me.ifitting.app.debug:1.0.1_dev:1001. 
* me.ifitting.app.ui.activities.FragmentContainerActivity has leaked: 
* GC ROOT static org.lzh.framework.updatepluginlib.UpdateConfig.config 
* references org.lzh.framework.updatepluginlib.UpdateConfig.checkWorker 
* references org.lzh.framework.updatepluginlib.business.DefaultUpdateWorker.checkCB 
* references org.lzh.framework.updatepluginlib.callback.DefaultCheckCB.checkCB 
* references me.ifitting.app.ui.view.me.setting.VersionUpdateFragment$1.this$0 (anonymous class implements org.lzh.framework.updatepluginlib.callback.UpdateCheckCB) 
* references me.ifitting.app.ui.view.me.setting.VersionUpdateFragment.rootView 
* references com.zhy.autolayout.AutoLinearLayout.mContext 
* leaks me.ifitting.app.ui.activities.FragmentContainerActivity instance 

* Reference Key: 69cacf0c-cd63-4e11-80df-fa3fc1dbc3af 
* Device: ZTE ZTE ZTE Grand S II LTE P897A20 
* Android Version: 5.1 API: 22 LeakCanary: 1.3.1 
* Durations: watch=5021ms, gc=163ms, heap dump=5623ms, analysis=24571ms 

* Details: 
* Class org.lzh.framework.updatepluginlib.UpdateConfig 
|   static $staticOverhead = byte[] [id=0x12c12c01;length=16;size=32] 
|   static $change = null 
|   static config = org.lzh.framework.updatepluginlib.UpdateConfig [id=0x12c61f80] 
* Instance of org.lzh.framework.updatepluginlib.UpdateConfig 
|   static $staticOverhead = byte[] [id=0x12c12c01;length=16;size=32] 
|   static $change = null 
|   static config = org.lzh.framework.updatepluginlib.UpdateConfig [id=0x12c61f80] 
|   checkCB = null 
|   checkWorker = org.lzh.framework.updatepluginlib.business.DefaultUpdateWorker [id=0x132de420] 
|   context = me.ifitting.app.common.App [id=0x12c0e3a0] 
|   downloadCB = null 
|   downloadDialogCreator = null 
|   downloadWorker = null 
|   fileCreator = null 
|   installDialogCreator = null 
|   jsonParser = me.ifitting.app.common.App$1 [id=0x12d45720] 
|   strategy = null 
|   updateDialogCreator = null 
|   url = java.lang.String [id=0x12c08ae0] 
* Instance of org.lzh.framework.updatepluginlib.business.DefaultUpdateWorker 
|   static $staticOverhead = byte[] [id=0x12e98881;length=8;size=24] 
|   static $change = null 
|   checkCB = org.lzh.framework.updatepluginlib.callback.DefaultCheckCB [id=0x13367d80] 
|   parser = me.ifitting.app.common.App$1 [id=0x12d45720] 
|   url = java.lang.String [id=0x12c08ae0] 
* Instance of org.lzh.framework.updatepluginlib.callback.DefaultCheckCB 
|   static $staticOverhead = byte[] [id=0x12fcec81;length=8;size=24] 
|   static $change = null 
|   actRef = java.lang.ref.WeakReference [id=0x13367da0] 
|   builder = org.lzh.framework.updatepluginlib.UpdateBuilder [id=0x12c61e80] 
|   checkCB = me.ifitting.app.ui.view.me.setting.VersionUpdateFragment$1 [id=0x12f27e40] 
* Instance of me.ifitting.app.ui.view.me.setting.VersionUpdateFragment$1 
|   static $staticOverhead = byte[] [id=0x134f4e21;length=8;size=24] 
|   static $change = null 
|   this$0 = me.ifitting.app.ui.view.me.setting.VersionUpdateFragment [id=0x12f7b400] 
* Instance of me.ifitting.app.ui.view.me.setting.VersionUpdateFragment 
|   static $staticOverhead = byte[] [id=0x1341ec01;length=8;size=24] 
|   static $change = null 
|   layoutDesc = null 
|   tvCurrentVersion = null 
|   lifecycleSubject = rx.subjects.BehaviorSubject [id=0x12ffa160] 
|   mActivity = null 
|   navigator = me.ifitting.app.common.Navigator [id=0x12e4b420] 
|   rootView = com.zhy.autolayout.AutoLinearLayout [id=0x13143000] 
|   toolbarTitleView = null 
|   toolbarView = null 
|   presenterDelegate = nucleus.view.PresenterLifecycleDelegate [id=0x12fe5060] 
|   mAdded = false 
|   mAllowEnterTransitionOverlap = null 
|   mAllowReturnTransitionOverlap = null 
|   mAnimatingAway = null 
|   mArguments = android.os.Bundle [id=0x12ffa2e0] 
|   mBackStackNesting = 0 
|   mCalled = true 
|   mCheckedForLoaderManager = false 
|   mChildFragmentManager = null 
|   mContainer = null 
|   mContainerId = 0 
|   mDeferStart = false 
|   mDetached = false 
|   mEnterTransition = null 
|   mEnterTransitionCallback = null 
|   mExitTransition = null 
|   mExitTransitionCallback = null 
|   mFragmentId = 0 
|   mFragmentManager = null 
|   mFromLayout = false 
|   mHasMenu = true 
|   mHidden = false 
|   mHost = null 
|   mInLayout = false 
|   mIndex = -1 
|   mInnerView = null 
|   mLoaderManager = null 
|   mLoadersStarted = false 
|   mMenuVisible = true 
|   mNextAnim = 0 
|   mParentFragment = null 
|   mReenterTransition = java.lang.Object [id=0x130881a0] 
|   mRemoving = false 
|   mRestored = false 
|   mRetainInstance = false 
|   mRetaining = false 
|   mReturnTransition = java.lang.Object [id=0x130881a0] 
|   mSavedFragmentState = null 
|   mSavedViewState = null 
|   mSharedElementEnterTransition = null 
|   mSharedElementReturnTransition = java.lang.Object [id=0x130881a0] 
|   mState = 0 
|   mStateAfterAnimating = 0 
|   mTag = null 
|   mTarget = null 
|   mTargetIndex = -1 
|   mTargetRequestCode = 0 
|   mUserVisibleHint = true 
|   mView = null 
|   mWho = null 
* Instance of com.zhy.autolayout.AutoLinearLayout 
|   static $staticOverhead = byte[] [id=0x12f29001;length=8;size=24] 
|   static $change = null 
|   mHelper = com.zhy.autolayout.utils.AutoLayoutHelper [id=0x12f80a50] 
|   mBaselineAligned = true 
|   mBaselineAlignedChildIndex = -1 
|   mBaselineChildTop = 0 
|   mDivider = null 
|   mDividerHeight = 0 
|   mDividerPadding = 0 
|   mDividerWidth = 0 
|   mGravity = 8388659 
|   mMaxAscent = null 
|   mMaxDescent = null 
|   mOrientation = 1 
|   mShowDividers = 0 
|   mTotalLength = 1845 
|   mUseLargestChild = false 
|   mWeightSum = -1.0 
|   mAnimationListener = null 
|   mCachePaint = null 
|   mChildAcceptsDrag = false 
|   mChildCountWithTransientState = 0 
|   mChildTransformation = null 
|   mChildren = android.view.View[] [id=0x13117b40;length=12] 
|   mChildrenCount = 2 
|   mCurrentDrag = null 
|   mCurrentDragView = null 
|   mDisappearingChildren = null 
|   mDragNotifiedChildren = null 
|   mFirstHoverTarget = null 
|   mFirstTouchTarget = null 
|   mFocused = null 
|   mGroupFlags = 2244691 
|   mHoveredSelf = false 
|   mInvalidateRegion = null 
|   mInvalidationTransformation = null 
|   mLastTouchDownIndex = 1 
|   mLastTouchDownTime = 5267793 
|   mLastTouchDownX = 660.69666 
|   mLastTouchDownY = 1120.665 
|   mLayoutAnimationController = null 
|   mLayoutCalledWhileSuppressed = false 
|   mLayoutMode = -1 
|   mLayoutTransitionListener = android.view.ViewGroup$3 [id=0x12f80710] 
|   mLocalPoint = null 
|   mNestedScrollAxes = 0 
|   mOnHierarchyChangeListener = null 
|   mPersistentDrawingCache = 2 
|   mPreSortedChildren = null 
|   mSuppressLayout = false 
|   mTempPoint = float[] [id=0x13367900;length=2;size=24] 
|   mTransition = null 
|   mTransitioningViews = null 
|   mVisibilityChangingChildren = null 
|   mAccessibilityCursorPosition = -1 
|   mAccessibilityDelegate = null 
|   mAccessibilityTraversalAfterId = -1 
|   mAccessibilityTraversalBeforeId = -1 
|   mAccessibilityViewId = -1 
|   mAnimator = null 
|   mAttachInfo = null 
|   mAttributes = null 
|   mBackground = null 
|   mBackgroundRenderNode = null 
|   mBackgroundResource = 0 
|   mBackgroundSizeChanged = true 
|   mBackgroundTint = null 
|   mBottom = 1845 
|   mCachingFailed = false 
|   mClipBounds = null 
|   mContentDescription = null 
|   mContext = me.ifitting.app.ui.activities.FragmentContainerActivity [id=0x13626380] 
|   mCurrentAnimation = null 
|   mDrawableState = null 
|   mDrawingCache = null 
|   mDrawingCacheBackgroundColor = 0 
|   mFloatingTreeObserver = null 
|   mGhostView = null 
|   mHasPerformedLongPress = false 
|   mID = -1 
|   mInputEventConsistencyVerifier = null 
|   mKeyedTags = null 
|   mLabelForId = -1 
|   mLastIsOpaque = false 
|   mLayerPaint = null 
|   mLayerType = 0 
|   mLayoutInsets = null 
|   mLayoutParams = android.widget.FrameLayout$LayoutParams [id=0x131b4900] 
|   mLeft = 0 
|   mLeftPaddingDefined = false 
|   mListenerInfo = null 
|   mMatchIdPredicate = null 
|   mMatchLabelForPredicate = null 
|   mMeasureCache = android.util.LongSparseLongArray [id=0x132d5920] 
|   mMeasuredHeight = 1845 
|   mMeasuredWidth = 1080 
|   mMinHeight = 0 
|   mMinWidth = 0 
|   mNestedScrollingParent = null 
|   mNextFocusDownId = -1 
|   mNextFocusForwardId = -1 
|   mNextFocusLeftId = -1 
|   mNextFocusRightId = -1 
|   mNextFocusUpId = -1 
|   mOldHeightMeasureSpec = 1073743669 
|   mOldWidthMeasureSpec = 1073742904 
|   mOutlineProvider = android.view.ViewOutlineProvider$1 [id=0x70506228] 
|   mOverScrollMode = 1 
|   mOverlay = null 
|   mPaddingBottom = 0 
|   mPaddingLeft = 0 
|   mPaddingRight = 0 
|   mPaddingTop = 0 
|   mParent = null 
|   mPendingCheckForLongPress = null 
|   mPendingCheckForTap = null 
|   mPerformClick = null 
|   mPrivateFlags = 18877616 
|   mPrivateFlags2 = 1610819112 
|   mPrivateFlags3 = 0 
|   mRecreateDisplayList = false 
|   mRenderNode = android.view.RenderNode [id=0x131b6b80] 
|   mResources = android.content.res.Resources [id=0x12c09a60] 
|   mRight = 1080 
|   mRightPaddingDefined = false 
|   mScrollCache = null 
|   mScrollX = 0 
|   mScrollY = 0 
|   mSendViewScrolledAccessibilityEvent = null 
|   mSendViewStateChangedAccessibilityEvent = null 
|   mSendingHoverAccessibilityEvents = false 
|   mStateListAnimator = null 
|   mSystemUiVisibility = 0 
|   mTag = null 
|   mTempNestedScrollConsumed = null 
|   mTop = 0 
|   mTouchDelegate = null 
|   mTouchSlop = 24 
|   mTransformationInfo = android.view.View$TransformationInfo [id=0x132d88e0] 
|   mTransientStateCount = 0 
|   mTransitionName = null 
|   mUnscaledDrawingCache = null 
|   mUnsetPressedState = null 
|   mUserPaddingBottom = 0 
|   mUserPaddingEnd = -2147483648 
|   mUserPaddingLeft = 0 
|   mUserPaddingLeftInitial = 0 
|   mUserPaddingRight = 0 
|   mUserPaddingRightInitial = 0 
|   mUserPaddingStart = -2147483648 
|   mVerticalScrollFactor = 0.0 
|   mVerticalScrollbarPosition = 0 
|   mViewFlags = 939524224 
|   mWindowAttachCount = 1 
* Instance of me.ifitting.app.ui.activities.FragmentContainerActivity 
|   static $staticOverhead = byte[] [id=0x12ec4001;length=16;size=32] 
|   static $change = null 
|   static FRAGMENT_TAG = java.lang.String [id=0x12fff8c0] 
|   overrideTheme = -1 
|   accountManager = null 
|   accountType = null 
|   accounts = null 
|   fragmentRefs = java.util.concurrent.ConcurrentHashMap [id=0x12f1f400] 
|   lifecycleSubject = rx.subjects.BehaviorSubject [id=0x12f56e20] 
|   navigator = me.ifitting.app.common.Navigator [id=0x12e4b420] 
|   rootView = com.zhy.autolayout.AutoFrameLayout [id=0x13141400] 
|   tokenType = null 
|   toolbarTitleView = null 
|   toolbarView = null 
|   presenterDelegate = nucleus.view.PresenterLifecycleDelegate [id=0x12f56480] 
|   mDelegate = android.support.v7.app.AppCompatDelegateImplV14 [id=0x13287900] 
|   mEatKeyUpEvent = false 
|   mResources = null 
|   mThemeId = 2131427473 
|   mCreated = true 
|   mFragments = android.support.v4.app.FragmentController [id=0x12f7f100] 
|   mHandler = android.support.v4.app.FragmentActivity$1 [id=0x12f56460] 
|   mMediaController = null 
|   mNextCandidateRequestIndex = 0 
|   mOptionsMenuInvalidated = false 
|   mPendingFragmentActivityResults = android.support.v4.util.SparseArrayCompat [id=0x12ffe6e0] 
|   mReallyStopped = true 
|   mRequestedPermissionsFromFragment = false 
|   mResumed = false 
|   mRetaining = false 
|   mStartedActivityFromFragment = false 
|   mStopped = true 
|   mActionBar = null 
|   mActivityInfo = android.content.pm.ActivityInfo [id=0x12cb8400] 
|   mActivityTransitionState = android.app.ActivityTransitionState [id=0x12c76840] 
|   mAllLoaderManagers = android.util.ArrayMap [id=0x131b02a0] 
|   mApplication = me.ifitting.app.common.App [id=0x12c0e3a0] 
|   mCalled = true 
|   mChangeCanvasToTranslucent = false 
|   mChangingConfigurations = false 
|   mCheckedForLoaderManager = true 
|   mComponent = android.content.ComponentName [id=0x12f274c0] 
|   mConfigChangeFlags = 0 
|   mContainer = android.app.Activity$1 [id=0x12f7f0a0] 
|   mCurrentConfig = android.content.res.Configuration [id=0x12eb2510] 
|   mDecor = null 
|   mDefaultKeyMode = 0 
|   mDefaultKeySsb = null 
|   mDestroyed = true 
|   mDoReportFullyDrawn = false 
|   mEmbeddedID = null 
|   mEnableDefaultActionBarUp = false 
|   mEnterTransitionListener = android.app.SharedElementCallback$1 [id=0x70503608] 
|   mExitTransitionListener = android.app.SharedElementCallback$1 [id=0x70503608] 
|   mFinished = true 
|   mFragments = android.app.FragmentManagerImpl [id=0x12e9ec10] 
|   mHandler = android.os.Handler [id=0x12f56440] 
|   mIdent = 169397097 
|   mInstanceTracker = android.os.StrictMode$InstanceTracker [id=0x12f7f0e0] 
|   mInstrumentation = android.app.Instrumentation [id=0x12cbb150] 
|   mIntent = android.content.Intent [id=0x12cb9200] 
|   mLastNonConfigurationInstances = null 
|   mLoaderManager = null 
|   mLoadersStarted = false 
|   mMainThread = android.app.ActivityThread [id=0x12c39100] 
|   mManagedCursors = java.util.ArrayList [id=0x12f56420] 
|   mManagedDialogs = null 
|   mMenuInflater = null 
|   mParent = null 
|   mReferrer = java.lang.String [id=0x12fbcb80] 
|   mResultCode = 0 
|   mResultData = null 
|   mResumed = false 
|   mSearchManager = null 
|   mStartedActivity = false 
|   mStopped = true 
|   mTemporaryPause = false 
|   mTitle = java.lang.String [id=0x12de1740] 
|   mTitleColor = 0 
|   mTitleReady = true 
|   mToken = android.os.BinderProxy [id=0x12f5b2a0] 
|   mTranslucentCallback = null 
|   mUiThread = java.lang.Thread [id=0x738d3000] 
|   mVisibleBehind = false 
|   mVisibleFromClient = true 
|   mVisibleFromServer = true 
|   mVoiceInteractor = null 
|   mWindow = com.android.internal.policy.impl.PhoneWindow [id=0x12da4300] 
|   mWindowAdded = true 
|   mWindowManager = android.view.WindowManagerImpl [id=0x12fbf300] 
|   mInflater = com.android.internal.policy.impl.PhoneLayoutInflater [id=0x12fcf370] 
|   mOverrideConfiguration = null 
|   mResources = android.content.res.Resources [id=0x12c09a60] 
|   mTheme = android.content.res.Resources$Theme [id=0x12fbfba0] 
|   mThemeResource = 2131427473 
|   mBase = android.app.ContextImpl [id=0x12d18600] 

from updateplugin.

yjfnypeu avatar yjfnypeu commented on May 21, 2024

嗯。邮箱[email protected].多谢了

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024

fix 了么?

from updateplugin.

yjfnypeu avatar yjfnypeu commented on May 21, 2024

还暂时没有。应该这周内能修改完成。这段时间挺忙的这个版本改动也稍微大点。抱歉了

from updateplugin.

yjfnypeu avatar yjfnypeu commented on May 21, 2024

新版本上传了。现在改用jcenter仓库了。compile 'org.lzh.nonview.updateplugin:UpdatePlugin:0.4'

from updateplugin.

xiaolongyuan avatar xiaolongyuan commented on May 21, 2024

问题解决了?

from updateplugin.

yjfnypeu avatar yjfnypeu commented on May 21, 2024

嗯。解决了。不过在使用框架进行更新的过程中你将Activity关闭。仍然会有机率让LeakCanary检测出内存泄漏。不过这个不用理。更新任务完成后都会回收了的。

from updateplugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.