objective c - Live bytes growing with ARC over 200 MB on iPhone -


when run iphone app instruments, shows live bytes growing when go , forth displaying modal view controller, app doesn't killed after using on 200 mb.

what happening here? i'm consuming lot of memory? btw, using ios 7 arc.

the image below shows live bytes. instruments

thank you.

update: code in modal view controller

- (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath {     static nsstring *cellidentifier = @"actioncell";     uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier forindexpath:indexpath];      // configure cell...     action *action = self.actions[indexpath.section][indexpath.row];     cell.textlabel.text = action.title;     cell.textlabel.textcolor = self.sectioncolors[indexpath.section];      customcellbackgroundview *customcellbackgroundview = [[customcellbackgroundview alloc] init];     customcellbackgroundview.bordercolor = self.sectioncolors[indexpath.section];     customcellbackgroundview.fillcolor = [self.sectioncolors[indexpath.section] colorwithalphacomponent:0];      if ([self.actions[indexpath.section] count] == 1) {         customcellbackgroundview.position = customcellbackgroundviewpositionsingle;     } else if (indexpath.row == 0) {         customcellbackgroundview.position = customcellbackgroundviewpositiontop;     } else if (indexpath.row == [self.actions[indexpath.section] count] - 1) {         customcellbackgroundview.position = customcellbackgroundviewpositionbottom;     } else {         customcellbackgroundview.position = customcellbackgroundviewpositionmiddle;     }      cell.backgroundview = customcellbackgroundview;      return cell; } 

the modal view controller keeps weak delegate main view controller calls modal. , doesn't [self.presentedviewcontroller dismissviewcontrolleranimated:yes completion:null]; releases modal view controller (and subviews , variables)?

btw, customcellbackgroundview not problem, because have modal view controller uses in same way, not increase memory usage.

the weird thing after using 200 mb, app not killed, why (not running on simulator, running on actual iphone)?

this matter took me time understand, though ark amazing, , helps allot! cannot code complex app, , throw data management handled ark out help.

every viewcontroller, must have "viewwilldissapear" method, , there, need turn nil every object used, ark knows right rid of it.

//important if use images in app, important release them after, turning them nil. if use context, must release hand! make shore not keeping manny views on top of each ether! if use audio file, must release after!

last note, make sure u not holding "strong" references objects there no need hold strong reference to. because never released.

hope helps, happy programming.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -