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

在切换碎片时有几率报未释放的错误 #27

Open
1525685999 opened this issue Jul 5, 2017 · 10 comments
Open

在切换碎片时有几率报未释放的错误 #27

1525685999 opened this issue Jul 5, 2017 · 10 comments

Comments

@1525685999
Copy link

pwa5f 0g5xcn19ln5z vw

@Rukey7
Copy link
Owner

Rukey7 commented Jul 6, 2017

你看有没有调用对应的释放方法,我例子里是写在ondestroy()里,fragment切换你自己加下释放看看

@1525685999
Copy link
Author

if (mPlayerView!=null){
mPlayerView.stop();
mPlayerView.onDestroy();
mPlayerView=null;
}我在fragment的ondestory里面调用 上面那几行,但还是会出现 上述的错误

@1525685999
Copy link
Author

image
是图片 上框起来的这个位置 总是抱着错误

@1525685999
Copy link
Author

特别是两个碎片都是播放视频,当一个碎片播放完,立马切换另外一个的时候

@Rukey7
Copy link
Owner

Rukey7 commented Jul 24, 2017

感觉是在切换的时候还没释放,然后又在加载给报错了

@1525685999
Copy link
Author

有三个碎片,其中两个放图片,一个放您的视频控件,循环切换,循环到第三周或者第四周时 也会出现这个错误 ,之后
我将您的代码 稍做了些改动 就没有出现这个错误了

@1525685999
Copy link
Author

image

@1525685999
Copy link
Author

image

@1525685999
Copy link
Author

每次 碎片结束时 都要调用这个释放,就不会出现这个问题了

@Rukey7
Copy link
Owner

Rukey7 commented Jul 24, 2017

嗯,我目前还没遇到要这种用法的,下次碰到也好留个心眼

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

2 participants