I'm making a simple game using Xcode 10.1 IDE and swift 4.2
I've designed the main menu system so that each pages UI is presented through a separate scene.
Each time a new scene is loaded I get approximately 0.1 MB increase in memory usage. Not much but I don't want to start scaling the game with this issue.
Memory leak when presenting SpriteKit scenes
Memory problems when switching between scenes SpriteKit
Tab-based SpriteKit Apps and Scene Caching
I've had a good look through reference material and online. I've checked for Retain Cycles, through the following: Inserted deinit statements at the end of all scenes and object classes used. They are all called correctly. Profiled the app to look looking for zombie objects and leaks, with nothing obvious shown in the profiler results when running.
Does anyone have any idea to what causes memory leaks or caching on scene transitions and ways to prevent this?
I'm stumped scaling the game now seems like the wrong thing to do as the issue will probably compound as complexity increases.