osc-receivers: fix events not registered properly -> memory leak
This commit is contained in:
parent
4cb8f0db3a
commit
96d751849d
2 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue