I like having teardown logic live right next to buildup logic. It’s sort of a cousin to why I prefer using initializers over splitting up declarations and doing initialization in constructors (where possible). Then if I add a new Observable
later, I only have to edit one place, because it can share the same tripwire. Golang has this concept burned into the language itself with its defer
statement, and I find it very helpful in dealing with things like rolling back SQL transactions in error situations.
↧
Should I unsubscribe Observables lists?
↧