Hi guys and sorry for this noob question, i'm allocating a cpu intensive game class in this way:
gamePlayScreen = [[GamePlay alloc] init]; [mContents addChild:gamePlayScreen]; [gamePlayScreen release];
When the class has finished its life cycle (or when i want to terminate it) i release it in this way:
[mContents removeChild:gamePlayScreen]; gamePlayScreen = nil;
Well, as i said the GamePlay class is quite CPU intensive and, considered that i'm a noob, it probably contains some memory leaks... but i was expecting that every time i release it i also clean all the memory it have occupied while running but it's not happening.
If i quickly trigger the buttons that allocate and deallocate that class 15 times i receiving the memory alerts and finally a crash.
Something is "leaving" in the deallocated class even if the class itself has been released? I'm totally unable to find an answer with the instruments...