HI,ALL
I am working at a small game project and I have the following code:
-(id) init{
// init variables ...
[self schedule:@selector(autoFall:) interval:5];
}
-(void) autoFall:(ccTime)dt
{
NSLog(@"currentRow: %d", currentRow);
if( currentRow < 10 ){
[ self fallBooms ];
}
currentRow ++;
}
as the codes above show, we generate booms every 5s if currentRow is less then 10.
build and run the game , everything is fine , the console print log every 5 s:
currentRow: 1
currentRow: 2
currentRow: 3
currentRow: 4
currentRow: 5
......
but after some thimes, the game hang, and the console print log crazy:
....
currentRow: 3903
....
currentRow: 4939
...
the game just hang , it does not crash, and there is no other error info .
Any suggesstion or help will be appricated. Thanks.