I hope someone can help me find an answer to this problem. I filed a bug report to apple a few weeks ago (28684035) but they have not responded to my report yet. The apple forum is no help either. My game is in development and it sometimes crashes at pre-loading time when all I do is call the method SKTextureAtlas preloadWithCompletionHandler.
Please see the details below. If you have any questions regarding the problem, please feel free to post.
Summary: I created a test project, and simply added the following code in touchUpAtPoint:
SKTextureAtlas* atlas = [SKTextureAtlas atlasNamed:@"GlobalMap"];
[atlas preloadWithCompletionHandler:^{
}];
I looked at instruments and it shows memory leaks whenever this method is called. It crashes eventually. I discovered this leak because in my ongoing game project, I preload several of my atlases at the beginning of the game. It started crashing when I updated my code to XCODE 8.0 and my iPhone to IOS 10.0
Steps to Reproduce:
- Create a test project
- Add an atlas to the project
- Add the preloadWithCompletionHandler code.
- Run the app and monitor memory aloocation and leaks in Instruments
- Touch the screen several times (or even once - you'll see some leaks)
Version: iOS 10.0.2 Configuration: iPhone 6