Posted March 14, 2020 by CaCh
This release simply fixes the memory leaks in the game, specifically when resetting.
These were caused partly by human error - there were one or two places where I forgot to destroy textures before reloading new ones - and partly because of the behaviour of something in the Unity engine that I was not aware of.
Basically every object in unity has an "OnDestroy" event which happens just before an object is removed/destroyed for any reason, eg. when resetting. I used this to clear out the old textures before creating new ones, taking for granted that it gets called no matter what.
It turns out that an object that hasn't been active yet won't trigger this event, meaning the textures won't be destroyed and continue to take up memory.