Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6692919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:55:22+00:00 2026-05-26T05:55:22+00:00

I have my tableView connected to a database table. When I tap on a

  • 0

I have my tableView connected to a database table.
When I tap on a row I push a view with all the details of the item. Every thing works fine.

This is the code in the main class:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    DetailsViewController *detailViewController = [[DetailsViewController alloc] initWithNibName:@"DetailsViewController" bundle:nil];

    NSDictionary *rowVals = (NSDictionary *) [shoppingListItems objectAtIndex:indexPath.row];

    NSString *titleString = [(NSString *) [rowVals objectForKey:@"item"] autorelease];
    NSString *category = [(NSString *) [rowVals objectForKey:@"groupid"] autorelease];
    NSNumber *priceNumber = [(NSNumber *) [rowVals objectForKey:@"price"] autorelease];
    NSString *priceString = [[priceFormatter stringFromNumber: priceNumber] autorelease];
    NSDate *date = [(NSDate *) [rowVals objectForKey:@"dateadded"] autorelease];
    NSString *dateString = [[dateFormatter stringFromDate:date] autorelease];
    NSNumber *IO = [(NSNumber *) [rowVals objectForKey:@"incout"] autorelease];

    detailViewController.stringTitle = titleString;
    detailViewController.categoryVar = category;
    detailViewController.priceVar = priceString;
    detailViewController.dateVar = dateString;
    detailViewController.IOVar = IO;

    [self.navigationController pushViewController:detailViewController animated:YES];
    [detailViewController release];
}

and this in the DetailsViewController.m

- (void)viewDidLoad {    
    [super viewDidLoad];
    self.navigationItem.title = stringTitle;
    nome.text = stringTitle;
    prezzo.text = priceVar;
    data.text = dateVar;
    if ([IOVar isEqualToNumber:[NSNumber numberWithInt:1]]) {
        categoria.hidden = NO;
        categoriaLabel.hidden = NO;
        photoLabel.hidden = NO;
        categoria.text = categoryVar;
    } else if ([IOVar isEqualToNumber:[NSNumber numberWithInt:0]]){
        categoria.hidden = YES;
        categoriaLabel.hidden = YES;
        photoLabel.hidden = YES;
        categoria.text = @"";
    }
}

If I push and go back more than 3 times my app crash with EXC_BAD_ACCESS in main.m

Thanks if you read till here, and sorry for my bad english.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:55:23+00:00Added an answer on May 26, 2026 at 5:55 am

    That definitely sounds like you’re over-releasing an object (aka a ‘zombie’).

    Xcode Instruments is an excellent tool for tracking down zombies.

    Read about it here, and give it a go.

    http://www.markj.net/iphone-memory-debug-nszombie/

    It’s much more fun than killing zombies in Call of Duty 😉

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom view controller showing the details of the selected item in
I have a tableview with large images that fill the cells and the row
I have a tableview that occupies only the bottom third of my view. I
I have a tableView:didSelectRowAtIndexPath: where I create a ViewController-Instance each time an item is
I have window with 3 table views (10.7.2, Xcode 4.2). They are all created
I have a simple table view which I have built using an example from
I am trying to add a UISearchbar to table header view. I have the
I have a table view class called RootViewController and a class providing WiFi functionality
I have a tableview, when the user selects a row i call a webservice
I have a tableview and a detailview, connected with segues. I want the detailview's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.