ios - Memory not freeing up after popping viewcontroller using ARC -


hi project arc based, using uinavigationcontroller make transition between viewcontroller. using profiler analyse happening behind scene memory. noticed when push viewcontroller allocate memory components , when pop not freeing allocated memory.

since using arc unable implement dealloc or release component. have analysed in detail , there no memory leak in project.

i not using strong property push viewcontroller. here how pushing viewcontroller.

viewcontroller *obj = [[viewcontroller alloc] init]; [self.navigationcontroller pushviewcontroller:obj animated:no]; 

any clue whats going on? should free memory have consumed. please advise

your description indicates have retain cycle, leads objects not being deallocated. typical source of retain cycles properties assigned loading nib files (usually declared iboutlet).

two strategies break them , release objects:

  1. declare property weak:

    @property (nonatomic, weak) iboutlet uilabel *statuslabel; 
  2. set property nil in viewdidunload:

    - (void)viewdidunload  {     self.statuslabel = nil;     [super viewdidunload]; } 

Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -