BOOL continueLoop;
CGPoint thePoint;
while(continueLoop != NO)
{
continueLoop = NO;
thePoint = [self generateRandomLocation];
NSMutableArray *blocks = [self getBlocksForX:thePoint.x];
for(BlueBlock *block in blocks)
{
if(block.getBlockLocationY == thePoint.y)
{
continueLoop = YES;
}
}
[blocks release];
}
This causes a crash when ran in instruments but not in Xcode. I narrowed the problem down, it happens when this line of code is in a loop... NSMutableArray *blocks = [self getBlocksForX: thePoint.x]; the method returns a NSMutableArray, I store it in blocks each time the loop is executed then at the end of the loop I release it. What would be causing instruments to crash?