I don't know if this is objective C / Cocos2D specific, and if it is objective C, maybe someone could tell me the ideal forum to ask that question?
This is just a function to test if a board is clear, and I'm creating a pointer and setting it to whichever cell we're checking. The object in the boardArray is a Block which subclasses CCSprite.
Heres the code:
-(bool)boardCleared {
for (int i = 0; i < 8; i++) {
for (int j = 0; j<8; j++) {
Block * blocko = [[boardArray objectAtIndex:i] objectAtIndex:j];
if (blocko.blockType != 0) {
return NO;
}
}
}
return YES;
}
The question is, is the pointer blocko need to be released? Or does it not count.
Thanks