Expected Behavior
Loading a new project should not keep around variables from an old project.
Actual Behavior
Loading a new project (via file upload) after having a project with monitors checked previously,
keeps around the variables from the old project in the new project. This is because the monitorBlocks container is not getting cleared out when clearing the VM runtime.
Steps to Reproduce
- Create a new project
- Create some variables and monitor them
- Load a new project from the filesystem
- Switch sprites and switch back or switch between the costume tab and the code tab
- Observe that the variables from your old project are in the toolbox
Proposed Solution
Remove knowledge of previous monitors when clearing the runtime
Thanks to @summerscar for finding this issue!