RxJS: BehaviorSubject unsubscribe

Viewed 22096

I am very new to observables am worried about memory leaks. If I create the following:

private client =  new BehaviorSubject("");
clientStream$ = this.client.asObservable();

and susbscirbe to them in views like so:

this.clientService.clientStream$.subscribe(
  client => {
    this.client = client;
  }
}

do I need to unsubscribe? What if I called client.getValue()?

1 Answers
Related