RujiK
Member
If you import your GMS2 project into GMS2.3, it converts all of your scripts into functions inside of scripts.
Unfortunately, every time the script is ran, THE SCRIPT RECREATES THE FUNCTION instead of erasing the old function with the same name. This is a huge memory leak. As far as I can tell, the only solution is to enable garbage collection, but garbage collection kills my FPS. Is there anyway to "delete" a function from memory manually?
Here is a simple example:
in create_event: gc_enable(false);
Then call the script 1000 times a frame and watch as your memory explodes. So my question, can I delete a function from memory or somehow prevent the leak?
Unfortunately, every time the script is ran, THE SCRIPT RECREATES THE FUNCTION instead of erasing the old function with the same name. This is a huge memory leak. As far as I can tell, the only solution is to enable garbage collection, but garbage collection kills my FPS. Is there anyway to "delete" a function from memory manually?
Here is a simple example:
in create_event: gc_enable(false);
Code:
// THIS IS INSIDE A SCRIPT!
function func_test(argument0,argument1,argument2) {
var xx = argument0;
var yy = argument1;
var zz = argument2;
return(false);
}