You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const ee = new EventEmitter();
const s = highland('someEvent', ee);
typeof ee._events.someEvent; // function
s.destroy();
typeof ee._events.someEvent; // function
Given that highland adds a new listener to ee on creation it should also remove that listener on destruction.
We should be able to use _destructors to register the removal:
function eeHandler () {
var ctx = mapper.apply(this, arguments);
self.write(ctx);
}
ee.on(xs, eeHandler);
var removeMethod = ee['removeListener'] || ee['unbind'];
if (removeMethod)
this._destructors.push(function () {
ee[removeMethod](xs, eeHandler);
});
The text was updated successfully, but these errors were encountered:
Consider:
Given that
highland
adds a new listener toee
on creation it should also remove that listener on destruction.We should be able to use
_destructors
to register the removal:The text was updated successfully, but these errors were encountered: