Fix event listeners not being cleaned up

Eventually if you hit the green flag a million times with a "green flag
=> say" stack, you'd get an event emitter memory leak error.
This commit is contained in:
Paul Kaplan 2017-10-23 11:17:39 -04:00
parent d8a3e659d5
commit 44ca62fefc

View file

@ -92,6 +92,7 @@ class Scratch3LooksBlocks {
this.runtime.renderer.destroySkin(bubbleState.skinId);
bubbleState.skinId = null;
}
target.removeListener(RenderedTarget.EVENT_TARGET_MOVED, this._onTargetMoved);
}
/**