What the program is doing is simply allocating an object and then releasing it.
I'm new to Instruments so I'm not sure I'm interpetingh this right:
The red line suggests there is a leak at the point where I allocate that object. But on the details you can see it was released and the refcount went back to 0. So why is there a red line in the first place, what is it exactly telling me?
EDIT: this is the "leak" detected. Code from my UIViewController:
- (void)viewDidLoad
{
[super viewDidLoad];
Plant *plant = [[Plant alloc] initWithWeight:3 withSpecies:@"carrot"];
[plant release];
}
I found it.
The class had a dealloc method that wasn't calling [super dealloc] at the end.