In the chapter MVP, in MainPresenter.kt, it is written
val observer: DisposableObserver<List<Movie>> get() = object : DisposableObserver<List<Movie>>()
but this means that each
get call to observer will create new Object for DisposableObserver. Why is that? Shouldn’t the object be initialized one time and would be reused? Also due to this the member becomes property of the class and will not have global scope which may result in garbage collection. Correct me if I am wrong.