bordoley / rx-reason

Reactive programming library for ReasonML/OCaml

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add CompositeDisposable and change Observer to implement it

bordoley opened this issue · comments

commented

This has some nice results.

  1. can remove the ondispose callback and the additional closure allocation.

  2. create can take a delegate disposable, insteaf of delegating a per instance disposable, the disposal logic can be added to the delegate as teardown logic

Observable.create can take a cb that returns teardown logic instead of a disposable. createWithObserver can take a function that returns unit.