S
Silversea
Guest
My game was experiencing a memory leak recently and by removing all other objects and code, I've narrowed the problem down to this:
Thing is, I can't think of any possible reason why this would be happening. Is there something with string_insert that is raising the memory?
The memory use increases at a rate of 256.06KB every 5 seconds, and the additional memory load does not disappear even when the objects are deleted, or rooms are changed. I've left the game alone for 2 minutes and the file use has gone from 12MB to 20MB. And it stays at 20MB until the next time this object is encountered, and then it continues rising.
Code:
//Draw Event
//draw nmbv with 3 digits, adding 0 to front if number < 100
sbno = nmbv;
repeat(2)
{
if string_length(string(sbno)) < 3
sbno = string_insert("0",sbno,0);
}
draw_text(x+30,y-20,sbno);
The memory use increases at a rate of 256.06KB every 5 seconds, and the additional memory load does not disappear even when the objects are deleted, or rooms are changed. I've left the game alone for 2 minutes and the file use has gone from 12MB to 20MB. And it stays at 20MB until the next time this object is encountered, and then it continues rising.