Has any of you encountered a similar memory leak?
This is how I'm handling the VideoView at the moment
@Override
protected void onFinishInflate() {
super.onFinishInflate();
ButterKnife.bind(this);
Uri videoUri = Uri.parse(String.format("android.resource://%s/%s", getContext().getPackageName(), videoRes));
videoView.setVideoURI(videoUri);
videoView.setOnPreparedListener(mp -> {
mp.setLooping(true);
videoView.start();
});
}
This is what I get on LeakCanary
Any help appreciated!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…