Fix leaking issue when add lifecycle observer#296
Fix leaking issue when add lifecycle observer#296hoangthan wants to merge 1 commit intorive-app:masterfrom
Conversation
The behavior for this flow has now been revised and adjusted by re-evaluating the |
Is |
The life-cycler you're using is activity lifecycle. The observer will be never removed in case activity not going on destroyed. |
The latest version is |
Since the context is using ActivityLifeCycle. So trying to add lifeCycleObserver without remove when the view is being detached will causing leak memory issue.
The lifeCycleObserver is already remove itself once the lifeCycle is reached
onDestroyed. But with activity, it will be never called until the activity is going on destroyed.