DataTorrent/Malhar — pull request #534 by andyperlitch (2013-12-17 19:13:05+00:00)
Title: Fixes #510, Unsubscribe Logical Operators when not used by any widget

In order to make this happen, a new option for widget injections had to be added: onRemove. Usage:

// in widget definition...
injections: {
// other injections...
onRemove: function() {
// return some onRemove function
return function() {
console.log('This will be called when the widget is removed');
}
}
}