I encountered a problem where after using /reload, the memory used by my script was not cleared and with each use of /reload the memory used only increased and did NOT decrease after a while.
This was apparently due to using World.tickingAreaManager in the code. Once I stopped using it, memory usage after using /reload stopped increasing. So, due to this leak, after several uses of /reload the application may crash.
Basically all you need to reproduce this bug is to use World.tickingAreaManager and /reload a few times.
I used the Minecraft Bedrock Debugger extension for Visual Studio Code to monitor memory. And I have attached the manifest and the script that was used and caused the bug.
Thank you for helping us improve Minecraft! We saved your files: