Fix two memory leaks (#3747)

* Fix two memory leaks
This commit is contained in:
Sam El-Husseini
2020-03-13 14:49:08 -07:00
committed by GitHub
parent 877063b5bd
commit 14428a0da4
5 changed files with 30 additions and 3 deletions

View File

@@ -291,6 +291,7 @@ Blockly.BlockDragger.prototype.maybeDeleteBlock_ = function() {
// Fire a move event, so we know where to go back to for an undo.
this.fireMoveEvent_();
this.draggingBlock_.dispose(false, true);
Blockly.draggingConnections = [];
} else if (trashcan) {
// Make sure the trash can is closed.
trashcan.close();