ds_queue_destroy(id);
参数 | 描述 |
---|---|
id | The id of the data structure to remove. |
返回: N/A(无返回值)
This function will remove the given queue data-structure from memory, freeing up the resources it was using and removing all values that it contained. This function should always be used when you are finished using the ds_queue to prevent memory leaks that can slow down and crash your game.
if lives = 0
{
ds_queue_destroy(AI_queue);
AI_queue = -1;
room_goto(rm_Menu);
}
上面的代码将检查内置全局变量 "生命" 的值, 如果它是 0, 它会销毁在变量 "AI _ 队列" 中索引的 ds _ 队列, 然后更改游戏房间。