Luuk Gruijs
1 min readJun 18, 2018

--

Hi david,

Thank you for your message and feedback.

In manner 2 none of the variables is an observable. As you can see we directly subscribe to the client function. That function returns an Observable which we subscribe to. The value of the Observable is pushed to our subscribe and within the subscribe we assign that value to our class property. So none of the variables are in an Observable state.

Regarding the memory leak you you’re indeed right, this example is a bit misleading as Observables coming from Angulars HttpClient automatically complete so you don’t have to do anything extra here.

hope this helps

--

--

Luuk Gruijs
Luuk Gruijs

No responses yet