lifecycle

val lifecycle: LifecycleOwner? = null

Parameters

lifecycle

将Activity/Fragment/LifecycleOwner等作为参数传递会在其生命周期结束时自动取消网络请求. 避免内存泄漏