Open also opened 10 years ago
My idea is to add an end condition to the source instead. For instance
model.apply(changes.takeUntil(end))
Would this suit your needs? Bus will take care of cleaning up the references on End event, so you don't have to worry about memory.
I need to unsubscribe a model from a source added with
model.apply
.The unplug function returned by
bus.plug
isn't returned (https://github.com/baconjs/bacon.model/blob/master/src/bacon.model.coffee#L47), so I can't see how to use the model without leaking memory.