Memory Issues
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.
Files
Get The Torture Game 2X
The Torture Game 2X
A sandbox game
More posts
- Small UpdateMay 06, 2020
- StatsApr 28, 2020
- Small bug fixesApr 25, 2020
- New StuffApr 24, 2020
- Bug fixesMar 31, 2020
- UpdateMar 28, 2020
- Sword UpdateFeb 22, 2020
- Minor UpdateFeb 18, 2020
Leave a comment
Log in with itch.io to leave a comment.