This is more or less a Gamemaker version of C++'s Smart Pointers. In Gamemaker, sometimes you will need something like a map inside a list inside a queue. Keeping track of all these data structures can get out of hand, and you need to keep reworking the code to clean up all the data structures. Using this script, you don't.
Using this set of scripts, you will never encounter another memory leak from data structures. Let's explain how it works so you understand before you download it.
You call SP_Init()
When you make data structures, just add them to the watchlist using SP_AddStructure()
Call SP_Destroy() at the end of the game
When adding structures to the watchlist, you can choose what kind of scope the data structure has. Maybe you want the data structure to go with the object, maybe with the room, maybe both, or even just have it in the watchlist and do nothing. It's really simple to implement and save you a lot of time.
Documentation: Google Drive
End User Licence Agreement (EULA).
Remembered to include the documentation with the asset.