Destroys a grid, freeing the memory used.



Argument Description
index This index of the grid to destroy.

Returns: N/A


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


if lives = 0

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

Back: DS Grids
Next: ds_grid_width
© Copyright YoYo Games Ltd. 2018 All Rights Reserved