No Revisions Have Been Made To This Page
Can you suggest an edit for this page? Click Here
GML Code Example
|surface_id||The ID of the surface to be freed.|
When you are working with surfaces, you should always use this
function whenever you are finished using them. Surfaces take up
space in memory and so need to be removed, normally at the end of a
room, but it can be done at any time depending on the use you put
them to. Failure to do so can cause memory leaks which will
eventually slow down and crash your game.
NOTE: When working with surfaces there is the possibility that they can cease to exist at any time due to them being stored in texture memory. You should ALWAYS check that a surface exists using surface_exists before referencing them directly. For further information see Surfaces.