Merge pull request #970 from vmarchesin/fix-memory-leak-issue-952
[FIX] Resolve #952 - memory leak in createEventHub
This commit is contained in:
@ -423,6 +423,7 @@
|
||||
" off(event, handler) {",
|
||||
" const i = (this.hub[event] || []).findIndex(h => h === handler);",
|
||||
" if (i > -1) this.hub[event].splice(i, 1);",
|
||||
" if (this.hub[event].length === 0) delete this.hub[event];",
|
||||
" }",
|
||||
"});"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user