I'm working on a game for iOS, and to start a new game the following steps are followed:
- The user choose the number of pieces
- Each piece is created through a loop
- The game starts
On the simulator I can choose as many pieces as I want, and start as many games as I want, and the app is working fine.
But on a real device (my new iPad 3), the app crashes if I choose more than 400 pieces, and also if I start (say) 3 games with 150 pieces each. I've checked with breakpoints, it crashes in different lines: sometimes creating a piece, sometimes even after the game started. Unfortunately the console is not telling me anything.
I checked the app with instruments: there are not leaks at all, and the total allocation size is at most 4 MB. And I'm logging in didReceiveMemoryWarning in my AppDelegate, but it looks like it is never called.
My question is: how should I behave to debug this? How can I understand what the computational/memory limits of a iOS device are?