My game done with Javabindings creates a bunch of sprites at the beginning of the game and put it in an array.
Later, as the sprites are needed they will be attached to the scene. I operated this way because I heard that attaching them and than hide them with setVisible will put the sprites in the memory.
All is working fine with the IOS simulator, the game runs without problems.
But I tryed to put the files on a real Device, an Ipod Touch 4th with 8Gb of ram and IOS6.
The program creates about 50 MenuItemImage classes with image files, put them in an array and then attempts to load about 50 Sprites with an image too but the device processes 7-9 sprites and crashes with this error:
exited abnormally with signal 9: Killed: 9.
So I do not understand why on the simulator it works and on the device not ?!
Seems sad that the program can load only 60 sprites before crash.
The last 9 sprites loaded are big twice the screen size maybe the problem is that ?
I call retain() after each cc.Sprite.create(‘image’);
Removing retain do not help.
So what can I do to solve the problem ?