Closed AndreyAttr closed 7 years ago
We MUST use unsubscribe everywhere we use subscription on Observable.
Not everywhere. We musn't unsubscribe if subscription lifetime is the same as application time. For example, I commented out unsubscription into AppComponent because its lifetime is the same as application lifetime. And when application dies then AppComponent also dies and subscription will be lost(died). So, no leak of memory in this case
We subscribe(Subsciption) on Observable to interact between components with a help of interaction services. We MUST use unsubscribe everywhere we use subscription on Observable.