What is the impact of not unsubscribing from a RxJS Stream after it was completed? e.g. Angular 2 Http request.
Can this lead to a memory leak?!
What is the impact of not unsubscribing from a RxJS Stream after it was completed? e.g. Angular 2 Http request.
Can this lead to a memory leak?!
You don't actually have to unsubscribe from http requests because they complete immediately after the response/error arrived (and returned to the subscriber).
The impact will be the Observable / Subscription javascript variables not being garbage collected because they'll leave a reference, and will in turn create a memory leak.
It may or may not affect performance, depends on how many times a new Observable/Subscription is created and "left to rot".