|
|
@ -625,8 +625,10 @@ public class ViewModelMessages extends ViewModel {
|
|
|
|
owner.getLifecycle().addObserver(new LifecycleObserver() {
|
|
|
|
owner.getLifecycle().addObserver(new LifecycleObserver() {
|
|
|
|
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
|
|
|
@OnLifecycleEvent(Lifecycle.Event.ON_DESTROY)
|
|
|
|
public void onDestroyed() {
|
|
|
|
public void onDestroyed() {
|
|
|
|
boundary.destroy(state);
|
|
|
|
if (boundary != null) {
|
|
|
|
boundary = null;
|
|
|
|
boundary.destroy(state);
|
|
|
|
|
|
|
|
boundary = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
owner.getLifecycle().removeObserver(this);
|
|
|
|
owner.getLifecycle().removeObserver(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|