I recently came across an issue with actors in which I found out that they don’t get garbage collected. I’ve attached a place file as showcase.
There is a script in StarterPlayerScripts. If you hit E on the keyboard, it will simulate the actor leaks.

LuauHeap examination shows evidence of unnecessary memory usage (all the Actors and scripts are destroyed, so they should not be used in memory):
If this is actually expected behavior, please tell me, but I’m pretty sure that this is a problem.
Place File:
Actor Memory Leaks Example.rbxl (57.4 KB)
- Step 1) Play and Press F9, and take a LuauHeap snapshot
- Step 2) Press E on the keyboard
- Step 3) Wait 5 seconds, then take another LuauHeap snapshot
- Step 4) You should notice that, despite the actors and scripts being destroyed, they are still being used in memory
Expected behavior
If everything was working correctly, I would expect destroyed Actors to not be used in memory.
