iphone - Why does it crash the second time? -


hey guys, i'm new objective-c, , i'm making app, , when click on table cell it's supposed to, when go , click on cell second time, crashed "exc_bad_access". tell me means, , why crashing second time, , how fix it? i'm pretty sure it's in function:

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { // navigation logic may go here. create , push view controller.      racedata * data = [self.units objectatindex:indexpath.row];     protossinfo * info = [[protossinfo alloc] initwithnibname:@"protossinfo" bundle:nil];       // ...      // pass selected object new view controller.     [self.navigationcontroller pushviewcontroller:info animated:yes];      info.title = data.titler;     info.minerals.text = data.min;     info.vespene.text = data.vesp;     info.supply.text = data.sup;     info.portrait.image = data.porty;      [info release];     [data release];  }   

you're releasing data, didn't retain.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -