map.destroy()
Destroys a map.
This function is the :removeSelf() of Dusk. It deletes a map, along with all layers, tilesets, and any other resources the map has used. Make sure the map is set to nil after using to eliminate chances of memory leaks.
:removeSelf()
nil
(none)