Default Memory Leak occuring only in game and not in studio

For some unknown reason, there is a memory leak occurring in my game which does not happen in Roblox studio and only in a server. It occurs in the default section under the core memory tab of the client. This started occurring last week, and I have been trying to pinpoint the exact cause of this but to no avail. It has been affecting many players of my game and crashing their clients after an hour of playing. IIRC, I did not make any drastic or huge changes to the client.

Screenshot of default tab in Studio:

Screenshot of default tab in a Roblox server:

As shown in the 2nd screenshot, the memory usage continues to rise linearly forever until the client crashes. There is no memory leak on the server side, and it only happens on the client. I believe that it may be some sort of internal Roblox script issue, and I am not sure what I could do to fix this issue if that is the case.

1 Like

Are you sure you don’t leave any functions that allocate memory behind somewhere?

1 Like

Yes, I am sure that I didn’t leave any functions or events that are leaking memory. I’ve made sure to disconnect all unneeded events and double checked all of my client sided scripts. This was not an issue before until it suddenly started occurring a week ago. The weirdest part about this issue is that it does not affect the game in studio.

1 Like

I’d suggest moving parts of your game separately into a different place, and checking in which cases the memory leak does/doesn’t occur, then trying to find out where in that game chunk the memory is getting leaked.