iphone - Application crashing upon release of UITableViewController -


I have a class that receives data from the original data and stores it in NSMutablearray, it also has a function Which gives this array to

Datamager. H:

@interfaceDatManager: NSOBK {NsmutbailArray * Feed Items; ...} @property (nontomic, titan) nsmutabalarere * feed items; ...

datamanager.m:

  ... - (zero) loadNews {(Load data from core data and keep it in itself. ) ....} - (NSMutableArray *) getAllItems {Back Self .feedItems; }  

Now I have a UIViewController (View 1 and View2) with 2 UIviews as IBOutlets when a button is clicked in View 1 then the DataManager receives data from the class then It sets it as the NSMUtAbualRere for the use of a UIMTV controller (TableView 1).

After assigning and starting the table allocation and setting Nsmutabalarr to populate the table, I add my view as a subview to see 2 scenes. Now my problem occurs when I issue tableview1 after this process I get an EXEC_BAD_ACCESS.

View1 button IBAction code:

  - (zero) Load items {if ([[Datamener getellenews] count]> gt;} {item tabs controller * Table view 1 = [[ItemTableView controller Alok] initWithNibName: @ "ItemViewViewController" bundle: Zero]; [Table 1Setem: List: [for section manager Millall Itims]]; (see in UIView * View2.subviews) {[view viewFromSuperview];} [ View 2 AddWebview: TableView 1.]]; [Tableview 1 release]; // If this is not released then It works properly EXEC_BAD_ACCESS}}  

Table view 1 setemultist function:

  - (zero) set item list: (NSMutableArray *) list {Self .emoList = list; //self.ItemList a NSMutableArray} How can I properly issue tableView1? I've also tried autorelease, still does not work.  

If you are using UIViewController in this way, you should have View1 Retained and then it is released later When it is not used. It can be done by placing

  [tableView1.view removeFromSuperview]; [Tableview 1 Release];   

In your dealloc


Comments