Skip to content

Commit 7f95a52

Browse files
author
Ivan Carballo
committed
Merge pull request ribot#31 from bhurling/master
Detach view from presenter to avoid memory leaks
2 parents 94dd0f6 + 8f7287c commit 7f95a52

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/src/main/java/uk/co/ribot/androidboilerplate/ui/main/MainActivity.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ protected void onCreate(Bundle savedInstanceState) {
5858
}
5959
}
6060

61+
@Override
62+
protected void onDestroy() {
63+
super.onDestroy();
64+
65+
mMainPresenter.detachView();
66+
}
67+
6168
/***** MVP View methods implementation *****/
6269

6370
@Override

0 commit comments

Comments
 (0)