Declined
Last Updated: 02 Dec 2021 12:17 by ADMIN
Michael
Created on: 12 Oct 2016 11:09
Category: MVVM
Type: Feature Request
2
Nesting and reusing Observables
Currently it is not possible to nest observables and reuse them without memory leaks. The reason is, that the bound event handlers get never unbound so that the dependencies never get resolved. 

In our opinion the change and get events should be unbound from the nested observable after the unbind of the view model. With more observables which use a nested observable the amount of events is getting bigger and bigger an the outer observables never get collected from the garbage collector.

We think that a method to clean up all handlers like outerObservable.destroy() could help. We also think that the use of nested observables is a common use case and that observables should not only be used for ViewModels. 

0 comments