iphone - Release UIViewController give exception -


i have uiviewcontroller add uiviewcontroler this:

reportviewcontroller *reportvc = [[reportviewcontroller alloc]initwithnibname:@"reportviewcontroller" bundle:nil]; [self.view addsubview:reportvc.view]; 

and try add

[reportvc release]; 

after lines , exepction when try remove reportvc.view

[self.view removefromsuperview]; 

did make error while release this?

in code removing "self.view" superview, shouldn't.
have remove "reportvc.view" superview.

you can write this:

[reportvc.view removefromsuperview];  [reportvc release];  reportvc = nil; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -