Skip to content

Commit

Permalink
[Fix] Properly dispose app bar component
Browse files Browse the repository at this point in the history
  • Loading branch information
rh-id committed Mar 31, 2022
1 parent 33df5bd commit 77f3f33
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ protected View createView(Activity activity, ViewGroup container) {
@Override
public void dispose(Activity activity) {
super.dispose(activity);
mAppBarSV.dispose(activity);
mAppBarSV = null;
if (mSvProvider != null) {
mSvProvider.dispose();
mSvProvider = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import m.co.rh.id.anavigator.annotation.NavInject;
import m.co.rh.id.aprovider.Provider;

@SuppressWarnings({"rawtypes", "unchecked"})
public class SettingsPage extends StatefulView<Activity> {

@NavInject
Expand Down Expand Up @@ -73,6 +74,8 @@ protected View createView(Activity activity, ViewGroup container) {
@Override
public void dispose(Activity activity) {
super.dispose(activity);
mAppBarSV.dispose(activity);
mAppBarSV = null;
if (mStatefulViews != null && !mStatefulViews.isEmpty()) {
for (StatefulView statefulView : mStatefulViews) {
statefulView.dispose(activity);
Expand Down

0 comments on commit 77f3f33

Please sign in to comment.