I am doing memory leak testing. The tool indicates a leak in line 2 of the code below. What is the reason?
DailySales *ds = [[DailySales alloc] initWithNibName:@"DailySales" bundle:nil];
[self.navigationController pushViewController:ds animated:YES];
[ds release];
Objects loaded from the NIB are leaking. Check your outlets and see if they are carefully
release
d in dealloc.The code looks fine. Are you running in the simulator or on the device? Running Instruments on the simulator can produce false leak reports.