Make sure that more parts of the VM get gc'd

This commit is contained in:
Thomas Weber committed 2021-06-24 14:09:18 -05:00
1 parent 9cefff811a
commit 5e70f33824
1 file changed
+6
+6
View File
@@ -79,6 +79,12 @@
$progress.text = 'Compressing project';
const serialized = await vm.saveProjectSb3();
const stageVariables = vm.runtime.getTargetForStage().variables;
// Try really hard to make sure that the VM can be garbage collected
for (const target of vm.runtime.targets) {
target.sprite.costumes = [];
target.sprite.sounds = [];
}
vm.clear();
projectData = {