`.publish().refCount()`
# rx
j
.publish().refCount()
👍 2
u
But in order to return the same observable you need to cache the observable to some field + behind some if == null check right?
j
No. Create it once and re-use it. Null needn't be involved.
u
sure eagerly / lazily initializing it, but the point is to actually share the instance, i.e. regular kotlin stuff right?
j
The instance must be shared, yes.
👍 1