Fix memory leak in PreviewFragment
This commit is contained in:
parent
e96aaba251
commit
414defaf47
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