Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMRoomPack

Package GameMaker rooms and load them as you please · By YellowAfterlife

How to destroy/cleanup when loading with room_pack_load_file?

A topic by noobcakes created Nov 25, 2018 Views: 265 Replies: 1
Viewing posts 1 to 2

I'm using the room_pack_load_file methodology with exported JSON rooms to load my rooms.  In the documentation I notice that the other methods have some corresponding function to cleanup when you are done with a room, such as ds_map_destroy.

I didn't see anything like this documented for the room_pack_load_file; so I'm wondering what is the proper method to cleanup after done with a room that has been loaded like this?

Developer

_load_file/_load_string are shorthands for buffer_load->json_decode->room_pack_load_map and json_decode->room_pack_load_map accordingly.

As such, they clean up their maps, though looking at it, I need to make _load_file clean up the temporary buffer as well. Other functions are unaffected.