I have a problem with release in navigationController. I have a map view with points. When I click on map point I create new detailViewController with detail. Everything works fine, but when I press back button my app back to the mapController and then crash. If I comment release everything works fine, but mapController is not release.
Here is my code:
FavoriteDetailViewController *detailViewController = [[FavoriteDetailViewController alloc]
initWithNibName:@"FavoriteDetailViewController" bundle:nil favoriteID:
[[(DisplayMapAnnotation*)view.annotation detailID] intValue] favoriteName:
[(DisplayMapAnnotation*)view.annotation title] favoriteCompany:
[(DisplayMapAnnotation*)view.annotation subtitle] favoriteLocation:
[(DisplayMapAnnotation*)view.annotation detailLocation] favoriteHtmlString:nil
favoriteJobIndex:0 favoriteTotalJobs:1 favoriteGeoLat:detailArrayData.geoLat
favoriteGeoLng:detailArrayData.geoLng favoriteFullUrl:detailArrayData.fullUrl
favoriteExportUrl:detailArrayData.exportUrl favoriteIdent:1];
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
Something in FavoriteDetailViewController is crashing when it is deallocated. Look carefully at the dealloc method. Also make sure you set and delegates of the FavoriteViewController to nil.