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
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (markdownPreview != null) {
|
||||
((ViewGroup) markdownPreview.getParent()).removeView(markdownPreview);
|
||||
markdownPreview.destroy();
|
||||
}
|
||||
unbinder.unbind();
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue