SecondsView causing Memory Leak
┬─── │ GC Root: System class │ ├─ android.os.Looper class │ Leaking: NO (Thread↓ is not leaking and a class is never leaking) D/LeakCanary: │ ↓ static Looper.sMainLooper ├─ android.os.Looper instance │ Leaking: NO (Thread↓ is not leaking) │ ↓ Looper.mThread ├─ java.lang.Thread instance │ Leaking: NO (the main thread always runs) │ Thread name: 'main' │ ↓ Thread.threadLocals │ ~~~~~~~~~~~~ ├─ java.lang.ThreadLocal$ThreadLocalMap instance │ Leaking: UNKNOWN │ Retaining 2,0 kB in 57 objects │ ↓ ThreadLocal$ThreadLocalMap.table │ ~~~~~ ├─ java.lang.ThreadLocal$ThreadLocalMap$Entry[] array │ Leaking: UNKNOWN │ Retaining 2,0 kB in 56 objects │ ↓ ThreadLocal$ThreadLocalMap$Entry[].[8] │ ~~~ ├─ java.lang.ThreadLocal$ThreadLocalMap$Entry instance │ Leaking: UNKNOWN │ Retaining 28 B in 1 objects │ ↓ ThreadLocal$ThreadLocalMap$Entry.value │ ~~~~~ ├─ android.animation.AnimationHandler instance │ Leaking: UNKNOWN │ Retaining 429,8 kB in 6701 objects │ ↓ AnimationHandler.mAnimationCallbacks │ ~~~~~~~~~~~~~~~~~~~ ├─ java.util.ArrayList instance │ Leaking: UNKNOWN │ Retaining 429,6 kB in 6696 objects │ ↓ ArrayList.elementData │ ~~~~~~~~~~~ ├─ java.lang.Object[] array │ Leaking: UNKNOWN │ Retaining 429,6 kB in 6695 objects │ ↓ Object[].[2] │ ~~~ ├─ android.animation.ValueAnimator instance │ Leaking: UNKNOWN │ Retaining 429,4 kB in 6694 objects │ ↓ Animator.mListeners │ ~~~~~~~~~~ ├─ java.util.ArrayList instance │ Leaking: UNKNOWN │ Retaining 84 B in 4 objects │ ↓ ArrayList.elementData │ ~~~~~~~~~~~ ├─ java.lang.Object[] array │ Leaking: UNKNOWN │ Retaining 64 B in 3 objects │ ↓ Object[].[0] │ ~~~ ├─ com.github.vkay94.dtpv.youtube.views.SecondsView$thirdAnimator$2$invoke$lambda-3$$inlined$doOnStart$1 instance │ Leaking: UNKNOWN │ Retaining 12 B in 1 objects │ Anonymous class implementing android.animation.Animator$AnimatorListener │ ↓ SecondsView$thirdAnimator$2$invoke$lambda-3$$inlined$doOnStart$1.this$0 │ ~~~~~~ ├─ com.github.vkay94.dtpv.youtube.views.SecondsView instance │ Leaking: YES (View.mContext references a destroyed activity) │ Retaining 428,8 kB in 6675 objects │ View is part of a window view hierarchy │ View.mAttachInfo is null (view detached) │ View.mID = R.id.null │ View.mWindowAttachCount = 1 │ mContext instance of me.a.Stream with mDestroyed = true │ ↓ View.mContext
i tried to stop all animation but doesn't work and i tried add to my onDestroy Activity still same
playerView.cancelInDoubleTapMode();
secondsView.setCycleDuration(0);
secondsView.cancelPendingInputEvents();
secondsView.stop();
The animation runs all the time, even when it's not visible. I worked around it by adding a animation control variable (toggled by start/stop) to break the infinite loop of animators (doOnEnd). I also had to remove animation start from YouTubeOverlay.changeConstraints().
Hello, got the same issue, if that's possible for you could you perhaps make a PR so we clear this issue out of the lib ?