When I have multiple subscribers to one observable, for example:
const myInterval = Rx.Observable.interval(500); const subscriptionOne = myInterval.subscribe(val => doSomething()); const subscriptionTwo = myInterval.subscribe(val => doSomething()); How can I know how many subscribers still register to the myInterval observable? I need this information for example to prevent memory leaks in case that I forgot to unsubscribe from one of them?