• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help in identifying memory leak?

Firstly, I also posted on Legacy Tech Support, not sure where this one belonged...!
Hey guys, possibly dealing with my first memory leak ever here. C: drive space lost permanently everytime I launch my game. In Debug mode right at game start, the Graph starts going way up and hits the roof soon after the game has started.
At the start of the game, I only have the randomize() event, and an Alarm taking to the next room.
I've made sure all paths are deleted after use, and all queues destroyed when the game ends.
If the Graph in Debug goes all the way up right at the start, does it mean smth at game launch is causing the leak? Or smth in the game overall?

thanks beforehand!!
 

sp202

Member
Your C: drive? I don't think that's a memory leak, maybe your cache is being filled up when compiling the project.
 

sylvain_l

Member
not really a leak, more just temp files that are kept instead of cleaned after each run.

if I remember correctly, everytime you run the project gamemaker create a temp folder with the exe and data file.
for GMS2 I think remember there is a way to tinker with the settings so the temp folder is cleaned up instead of being kept indefinitely. not sure how it works for GMS1.4 but chance the same settings are there.
 
@sylvain_l @sp202 thanks for quick replies. Huh, okay then, I just never noticed it eating my memory until C: started going red after I tested my project, and remained red after close. Startled me! So, in Preferences, I found "Automatically clean Temp Data on Shutdown" , i checked it, and suddenly tons upon tons of space freed from C: . Also deleted temp folders in Appdata. Seems okay now. I wonder why it happened only now, or why at least I would only have noticed it now and not before...
well, seems like case closed for now. THANKS A TON!!
 

gnysek

Member
The temp folder is always same for same game, and replaces content here (as temp file names are also always same), so it shouldn't be bigger than overall of resources you have (it may have left some texture pages for example, if there's less in new build). But I would say, it shouldn't be bigger than the project itself - if you ran into out of space issues on disk, that rather seems like you've got some files operation in game, rather than cache issue. As a 17-years user of GM, I never seen such an issue.
 
The temp folder is always same for same game, and replaces content here (as temp file names are also always same), so it shouldn't be bigger than overall of resources you have (it may have left some texture pages for example, if there's less in new build). But I would say, it shouldn't be bigger than the project itself - if you ran into out of space issues on disk, that rather seems like you've got some files operation in game, rather than cache issue. As a 17-years user of GM, I never seen such an issue.
theres still some 100 mb lost permanently, after closing the program, its improved a ton though from how it was when i posted here. I never noticed the loss before, so that got me wondering if its been happening for how long. Is there any other ways to make sure all space is lost only temporarily?
 

gnysek

Member
There are preferences in GM to clean cache on IDE close, but I won't tell you where exactly, as I'm on Ubuntu now. Try to serch in docs (in GMS, or docs2.yoyogames.com ).
 
There are preferences in GM to clean cache on IDE close, but I won't tell you where exactly, as I'm on Ubuntu now. Try to serch in docs (in GMS, or docs2.yoyogames.com ).
yeah, I checked 'Automatically clean Temp Data on Shutdown' in Preferences, but found nothing else that's relevant. i never think i had this memory loss issue before, it just kinda appeared, my C drive was already running out of space so its weird this only came up now and not way earlier...
So, is this all i can do, plus occasionally clear the cache?
 
tbh I think the issue is cleared now. I tweaked some more settings and should be fine now. on last run at least, didnt lose any disk space permanently. Thanks!
 
Top