Untracked memory and how to control it

Recently I’ve been scripting a game and while scripting this game I wasn’t paying close attention to the developer console and the amount of memory being used by my game. When t was testing time, I got a bunch of my testers to play the game and it seems there are frame-rate drops in game that I wasn’t experiencing in studio.

My question is: How do I control the amount of untracked memory in my game? I get there are several ways to deallocate memory from your game through not letting something be referenced after it is no longer needed but I don’t think this could be the issue for me. Usually, I watch my scripting and what things aren’t being garbage collected so i can set them to nil and also follow the common practices such as disconnecting events but the issue is that this isn’t enough since I am still seeing frame rate drops in my game.

I’ve opened the developer console to see what the issue was and it seems to be the there is a server side memory leak as it shows in the blow picture that the untracked memory of the server is varies around 100-300 gb.


Does anyone know how to diagnose and fix this issue?

It depends on your scripts. Without specifics, we can’t really offer much help. I can give you a few pointers in the right direction though. Are you making sure that you’re disconnecting connections with :Destroy()? Try disabling certain scripts and see if it has any effect on the tracked memory.