AndreyAttr / Evo

Evo repo
MIT License
0 stars 1 forks source link

Leak of memory #66

Closed AndreyAttr closed 7 years ago

AndreyAttr commented 7 years ago

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.

AndreyAttr commented 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