在 LifecycleObserver 类中,保存 Lifecycle 对象的引用有多好?会出现什么并发症?
class MyLocationListener implements LifecycleObserver {
private Lifecycle mLifecycle;
public MyLocationListener(Context context, Lifecycle lifecycle, Callback callback) {
mLifecycle = lifecycle
...
}
}