buffer_delete

Delete a previously created buffer.

Syntax:

GML Code Example

buffer_delete(buffer)


Argument Description
buffer The index of the buffer to delete.


Returns: N/A


Description

With this function you can delete a buffer previously have created using the function buffer_create from memory, releasing the resources used to create it and removing any data that it may currently contain.

NOTE: It's important to always remove any dynamically created resources from memory when you no longer need them to prevent memory leaks.


Example:

GML Code Example

buffer_delete(player_buffer);
 

The above code will delete the previously created buffer with the id stored in the variable "player_buffer".


Back: Buffers



No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here