Potential Memory Leak

I am super spooked after testing my game’s PlaceMemory with me and my friend, I am unsure, but I think I might have a memory leak. I am the most anxiety ridden person there is so I am not sure. Does script activity correlate to LuaHeap spiking? I dunno!

Data collected for people to see:

Studio Script Activity Watch:
Screenshot 2023-11-13 165628
Client Memory:


Screenshot 2023-11-13 173235


Server Memory:

My goal is to have an optimized well running game, and since I don’t know the statistics of this, I am unsure of what measures to take. I am aware of garbage collection, I perform many script connections but always disconnect them when unused, and I use proper instance deletion (hopefully)!

64 bit client takes up a lot of memory.

Is your memory usage going up over time and not coming down? If so, that’s more indicative of a memory leak than a simple number.

If your memory usage generally stays the same, or goes up but eventually goes down, you don’t have a memory leak.

Let me test this theory, and I’ll get back as soon as I can!

Stays pretty consistent around ~50 to ~60 MB, I am still questioning though. The friend I tested with, his stayed up consistent to around ~100 to ~120MB, is that because he has the 64-bit client?

Everyone should have the 64-bit client (unless you’re exploiting), and that isn’t a bad enough increase for it to be a memory leak.

1 Like

You should be testing for a longer period of time.

I was reading over the replies and have seen the minute difference in your last reply:

The best way to check if your game has a memory leak, is to simply just play it normally for a long period of time. And by a long period of time, I mean at least a minimum of an hour.

Additionally, the reason your friend has a different amount of memory compared to you is probably due to factors like the device he’s using, or the specifications of his device. Roblox allocates more memory to allow for the “optimal gaming experience”, which makes sense why there’s a memory difference.

3 Likes

I think I read something about studio using up nearly twice as much memory as client but I forgot in which aspect.

Yeah, again no clue for the statistics or testing times for diagnosing a Memory leak. Thank you all for your helpful feedback!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.