Fix memory leak in PreviewFragment
This commit is contained in:
parent
cd564ad363
commit
a42e375798
1 changed files with 5 additions and 1 deletions
|
@ -71,8 +71,12 @@ public class PreviewFragment extends Fragment implements MarkdownPreviewView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroyView() {
|
public void onDestroyView() {
|
||||||
super.onDestroyView();
|
if (markdownPreview != null) {
|
||||||
|
((ViewGroup) markdownPreview.getParent()).removeView(markdownPreview);
|
||||||
|
markdownPreview.destroy();
|
||||||
|
}
|
||||||
unbinder.unbind();
|
unbinder.unbind();
|
||||||
|
super.onDestroyView();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue