参数 描述
id The id of the data structure to remove.

返回: N/A(无返回值)


This function will remove the given list 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_list to prevent memory leaks that can slow down and crash your game.

重要!创建数据结构时,用于标识它的索引值是从0开始的整数值。这意味着不同类型的数据结构可以具有相同索引值,所以如果有疑问你应该使用ds_exists访问它们之前的功能。另请注意, 索引将被重用, 因此, 新创建的数据结构索引值可能会在之后使用, 因此我们建议一直将销毁后持有 ds 索引的变量设置为-1。


if lives = 0
   AI_list = -1;

The above code will check the value of the built in global variable "lives" and if it is 0, it destroys the ds_list indexed in the variable "AI_list" and then changes rooms.

上一页: DS Lists
下一页: ds_list_clear
© Copyright YoYo Games Ltd. 2018 All Rights Reserved