Something character related doesn’t seem to be cleaning the memory. I found 2 ways to reproduce it one is to keep respawning the character the other is to equip and destroy hats on the character. Everything added to the character seems to be cached somewhere in the memory forever. This happens on an empty baseplate as well.
Steps to reproduce:
- Add a hat to character
- Destroy the hat
MemoryLeak.rbxl (19.8 KB)
There are 2 scripts in ServerScriptService. LoadCharacter works but is much slower.
Before hats start equipping
After 1 minute
I first started noticing this in my game a few weeks ago, server crashes after being open for 2-4 days.