It's not released because when you:
[self.navigationController pushViewController:vc animated:YES];
The UINavigationController
has a reference to the vc
. So basically you have 2 references to it:
self.navigationController + ExploreViewController *vc = 2
At the end of the method you have one:
self.navigationController = 1
Once you pop the vc
from the UINavigationController
, the vc
should be released and the dealloc
method called. Another thing, you shouldn't call release
on object you don't own. In this case instantiateViewControllerWithIdentifier
returns an auto-release object.