Might be time to go to the optomitrist and get your glasses rechecked. It was definitely in earlier releases.I've just noticed "Clean up" event in objects, which seems to be very, very useful (it's a better version of "on destroy"). Was this added in 2.0.6, or was before and I was so blind to not notice this for two months?
On Room End / Game End, instance_destroy() isn't called. Also, clean event would "probably" also work on deactivated instances.Can someone give me an example of how this event improves on the Destroy Event?
Even after reading the manual it seems to me like it is triggered in the same instances where the Destroy Event would already be called.
I've just noticed "Clean up" event in objects, which seems to be very, very useful (it's a better version of "on destroy"). Was this added in 2.0.6, or was before and I was so blind to not notice this for two months?
Gnysek, since it appears that you have the Godlike power to discover brand new features and then bend reality so that they have been there all along... if I send you a short list of features please would you look for them in the current build for me? xDMight be time to go to the optomitrist and get your glasses rechecked. It was definitely in earlier releases.
I guess I wasn't aware of that. Then I can see the advantage of using it.On Room End / Game End, instance_destroy() isn't called.
If your object is not persistent, the yes, as this event won't be called if instance doesn't exists! Btw. if game is closing, then Windows will automatically clean all memory, so you don't need to clean on game end - only in mid-game when something isn't needed anymore.So I should switch to using the clean up event instead of Game End for cleaning up my data structures?
You don't need to clean up anything on game end. Game Maker does this for you when the application closes. The only stuff you should be doing in game end would be file saving and such.So I should switch to using the clean up event instead of Game End for cleaning up my data structures?
While this is true, I would still recommend manually ensuring everything is cleaned up, just in case you change your code logic, or how you restart your game, or anything like that. Being lax about cleaning up after your dynamic resources can lead to nasty memory leaks later down the line, and its really easy to do if you've been just letting the OS clean up after you.You don't need to clean up anything on game end.