With this function you can trigger the garbage collector, forcing it to run at the end of the current frame (step).
gc_collect();
N/A
if (global.debug == true && keyboard_check_pressed(vk_f1))
{
gc_collect();
}
The above code checks a global variable and a key being pressed and if those are true then garbage collection is triggered for the end of the frame (step).