We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
(ps 首页问题集锦和demo请先了解一下!)
在Activity中播放视频,缓冲的时候退出页面, 按照demo中写的:
@Override void onDestroy() { if(isPlay) { player.release() } }
由于此时还没有缓冲好,所以isPlay为false,但是AudioManager已经初始化了,所以会导致内存泄漏
这个问题和置顶的那个不一样,置顶的那个issue是AudioManager持有了Activity的Context
所有视频都可以复现
All
Latest
问题代码:(如果有)
xxxxxxx
Canary com.nevix.app D 1 APPLICATION LEAKS References underlined with "~~~" are likely causes. Learn more at https://squ.re/leaks. 717642 bytes retained by leaking objects Signature: 26e5ff0df7ac5e916d9a5a090836dbee2048b705 ┬─── │ GC Root: Global variable in native code │ ├─ android.media.AudioManager$2 instance │ Leaking: UNKNOWN │ Retaining 536 B in 1 objects │ Anonymous subclass of android.media.IAudioFocusDispatcher$Stub │ ↓ AudioManager$2.this$0 │ ~~~~~~ ├─ android.media.AudioManager instance │ Leaking: UNKNOWN │ Retaining 2.6 kB in 38 objects │ mApplicationContext instance of com.nevix.app.NevixApp │ ↓ AudioManager.mAudioFocusIdListenerMap │ ~~~~~~~~~~~~~~~~~~~~~~~~ ├─ java.util.concurrent.ConcurrentHashMap instance │ Leaking: UNKNOWN │ Retaining 444 B in 13 objects │ ↓ ConcurrentHashMap["android.media.AudioManager@544d56fcom.shuyu.gsyvideoplayer.video.base.GSYVideoView$1@a30e27c"] │ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ├─ android.media.AudioManager$FocusRequestInfo instance │ Leaking: UNKNOWN │ Retaining 188 B in 9 objects │ ↓ AudioManager$FocusRequestInfo.mRequest │ ~~~~~~~~ ├─ android.media.AudioFocusRequest instance │ Leaking: UNKNOWN │ Retaining 172 B in 8 objects │ ↓ AudioFocusRequest.mFocusListener │ ~~~~~~~~~~~~~~ ├─ com.shuyu.gsyvideoplayer.video.base.GSYVideoView$1 instance │ Leaking: UNKNOWN │ Retaining 12 B in 1 objects │ Anonymous class implementing android.media.AudioManager$OnAudioFocusChangeListener │ ↓ GSYVideoView$1.this$0
The text was updated successfully, but these errors were encountered:
#2267 (comment)
Sorry, something went wrong.
No branches or pull requests
(!!!!请务必务必按照issue模板,修改 后提交问题!!!!,不按模板提Isuue删除处理)
(ps 首页问题集锦和demo请先了解一下!)
问题描述:
在Activity中播放视频,缓冲的时候退出页面, 按照demo中写的:
由于此时还没有缓冲好,所以isPlay为false,但是AudioManager已经初始化了,所以会导致内存泄漏
出现问题的视频流
所有视频都可以复现
问题机型/系统:
All
GSY依赖版本
Latest
Demo中的复现步骤
问题代码:(如果有)
问题log(如果有)
The text was updated successfully, but these errors were encountered: