I have extra retain counts after calling initWithNib.
What could cause this? (There are no referencing outlets in the nib)
StepViewController *stepViewController = [[StepViewController alloc] initWithNibName:@"StepViewController" bundle:nil];
[self.navigationController pushViewController:stepViewController animated:YES];
[stepViewController release];
NSLog(@"nextStep stepViewController retain count %i", [stepViewController retainCount]);
the above results in a retain count of 3…
Thanks for any advice on how to troubleshoot
What are you troubleshooting? There is nothing wrong here. -retainCount is not your business and tells you almost nothing about the system. Every object that is autoreleased will have an apparent retainCount higher than you think it will be. If internal objects are interested in this object, they will have their own retains that you may or may not expect.
Your business is to balance your own retains and releases. The rest of the system is responsible for balancing theirs. You should not second-guess it, and if you do, -retainCount is unlikely to help you much anyway. It is almost always more misleading than helpful.
Is there actually a leak going on that you’re concerned about?