Not sure if the combined observable delegates doonunsubscribe to its sources.
If not is there a simple way to trigger the unsubscribles of its children?
In code:
observable o = observable.combinelatest(o1, o2);
If something triggers unsubscribe of o will it trigger the unsubscribe of o1 and o2?
Not sure what you mean.
Unsubscription is propagated to both
o1
ando2
but if you want to perform custom actions, you have to usedoOnUnsubscribe
on all relevant parties:But note that these are chain-global (instead of per-subscriber) actions and a second subscription/unsubscription to
o
may call them again. If you need per-subscriber resource management, look at theusing
operator.