osc-receivers: fix events not registered properly -> memory leak

This commit is contained in:
jean-emmanuel 2018-06-28 12:20:33 +02:00
parent 4cb8f0db3a
commit 96d751849d
2 changed files with 4 additions and 2 deletions

View file

@ -2,6 +2,8 @@
## 0.33.0
- bug fixes
- osc receivers not properly unregistered when widgets are recreated (memory leak)
- widgets
- **new** generic `matrix` widget
- fader: restore right-click focusing the input in compact mode (mouse only)

View file

@ -16,10 +16,10 @@ module.exports = class OscReceiver {
if (this.address !== address) {
if (this.address) osc.off(this.address + '.' + parent.hash, this.bindedCallback)
if (this.address) osc.off(this.address + '.' + this.parent.hash, this.bindedCallback)
this.address = address
osc.on(this.address + '.' + parent.hash, this.bindedCallback)
osc.on(this.address + '.' + this.parent.hash, this.bindedCallback)
}