Instruments is saying that there is a leak at the line: NSMutableDictionary *sceneWithDistance = [[NSMutableDictionary alloc] initWithCapacity:numKeys];
Why? I release the object - sceneWithDistance.
Why? I release the object - sceneWithDistance.
Code:
Why? We release sceneWithDistance.
- (NSMutableArray *) sortByDistance: (NSMutableArray *) toSort {
....
NSMutableDictionary *sceneWithDistance = [[NSMutableDictionary alloc] initWithCapacity:numKeys];
.....
[sorted addObject:sceneWithDistance];
[sceneWithDistance release];
}