android - VideoView memory leak -
has of encountered similar memory leak? how i'm handling videoview @ 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 on leakcanary
any appreciated!
when using butterknife fragments, need use unbinder
in ondestroyview()
correctly dereference fragment's views -- since fragments have different life cycles activities.
there related issue here.
Comments
Post a Comment