kingsley
09/10/2016, 4:43 PMlazy
and Android fragment. The fragment view might have been destroyed and recreated, but since we could still have the same fragment instance, a lazy initialized variable pointing to the view would be referencing an already disposed object.
= buggy code + memory leak
I'm referring to this kinda setup
val view by lazy { findViewById(R.id.view) }
Hopefully, this helps someone