Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoImageActivity 发生了内存泄露,我应该怎么去解决它,有没有大佬帮忙看一下,求求了 #235

Open
CandyTek opened this issue Jan 27, 2024 · 0 comments

Comments

@CandyTek
Copy link

┬───
│ GC Root: Global variable in native code

├─ com.oppo.media.OppoMediaPlayer instance
│ Leaking: UNKNOWN
│ Retaining 104.5 kB in 1803 objects
│ mContext instance of com.stx.xhb.demo.MyApplication
│ ↓ OppoMediaPlayer.mPlayer
│ ~~~~~~~
├─ android.media.MediaPlayer instance
│ Leaking: UNKNOWN
│ Retaining 103.7 kB in 1782 objects
│ mContext instance of com.stx.xhb.demo.MyApplication
│ ↓ MediaPlayer.mOnBufferingUpdateListener
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~
├─ xyz.doikki.videoplayer.player.AndroidMediaPlayer instance
│ Leaking: UNKNOWN
│ Retaining 102.3 kB in 1735 objects
│ mAppContext instance of com.stx.xhb.demo.MyApplication
│ ↓ AbstractPlayer.mPlayerEventListener
│ ~~~~~~~~~~~~~~~~~~~~
├─ xyz.doikki.videoplayer.player.VideoView instance
│ Leaking: YES (View.mContext references a destroyed activity)
│ Retaining 102.3 kB in 1734 objects
│ View is part of a window view hierarchy
│ View.mAttachInfo is null (view detached)
│ View.mID = R.id.player
│ View.mWindowAttachCount = 1
│ mContext instance of com.stx.xhb.demo.VideoViewActivity with mDestroyed =
│ true
│ ↓ View.mContext
╰→ com.stx.xhb.demo.VideoViewActivity instance
​ Leaking: YES (ObjectWatcher was watching this because com.stx.xhb.demo.
​ VideoViewActivity received Activity#onDestroy() callback and
​ Activity#mDestroyed is true)
​ Retaining 47.4 kB in 759 objects
​ key = c81f388c-db7a-45df-aea2-3b83e8228403
​ watchDurationMillis = 7846
​ retainedDurationMillis = 2845
​ mApplication instance of com.stx.xhb.demo.MyApplication
​ mBase instance of android.app.ContextImpl

METADATA

Build.VERSION.SDK_INT: 29
Build.MANUFACTURER: OPPO
LeakCanary version: 2.12
App process name: com.stx.xhb.xbanner
Class count: 12926
Instance count: 106566
Primitive array count: 77640
Object array count: 11981
Thread count: 35
Heap total bytes: 14838804
Bitmap count: 42
Bitmap total bytes: 12061122
Large bitmap count: 0
Large bitmap total bytes: 0
Stats: LruCache[maxSize=3000,hits=31852,misses=64421,hitRate=33%]
RandomAccess[bytes=3298533,reads=64421,travel=20850474448,range=17319375,size=22
481411]
Analysis duration: 3943 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant