Reputation: 55
i am developing a rss reader for iPhone, and i have a list of NSDictionary with the name of the site and the url. When i click the DetailDisclosureButton it takes me to another screen with the feeds of the site(I haven't implemented the xlm parser, so its just brings me the screen). Here's the problem after i go back and forth specifically 5 time my app crashes, and it does not show any message on the log.
I have no idea what is happening, what could cause such an error?
thanks!
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
// Gets the site;
NSDictionary *site = [sites objectAtIndex:indexPath.row];
// instantiate a view to see the unread news.
ViewUnreadController *uController = [[ViewUnreadController alloc] init];
uController.title = [site objectForKey:@"site"];
uController.site = site;
// adds the view to NavigationControllers stack (just adds a back button)
[self pushView:uController withBackTitle:@"Signatures"];
[site release];
[uController release];
And an additional information i am using the iPhone simulator 4.0.
Upvotes: 0
Views: 91
Reputation: 55
Ha! I realized that i was releasing the "site" variable (without retaining it), since it was pointing to an object in a NSMutableArray the reference count reached zero!
Upvotes: 1
Reputation: 3113
Well, you haven't really given us any information, so it could be a huge number of things. Profile your app, post the crash log here as an update to your question. Is this seen on the simulator or a device? Which device or what settings in the simulator are you using?
Arbitrarily guessing, maybe you're making new UIControllers and views every time and you're running out of memory. But that's just a shot in the dark at a target you haven't told me where is, or if it's even there.
Upvotes: 0
Reputation: 52227
Certainly you are over-releasing/under-retainig something. But without seeing you code, nobody will be able to tell more.
NSZombieEnabled might give you some useful informations
Upvotes: 0