audio_emitter_free


描述

With this function you can remove the given emitter from memory. This should always be done whenever the emitter is not going to be used further in the room or the game, ie: in the Destroy Event of the instance or in the Room End Event, otherwise you may end up with a memory leak that will slow down and eventually crash your game.


语法:

audio_emitter_free(emitter);


参数 描述
emitter The index of the emitter to free.


返回:

N/A(无返回值)


例如:

if lives = 0
   {
   audio_emitter_free(s_emit);
   room_goto(rm_Menu);
   }

The above code checks the value of the global variable "lives" and if it returns 0, it will destroy the emitter indexed in the variable "s_emit" and then go to the room indexed in the variable "rm_Menu".