Hi,
I have a table view, the mutable array pointer itemList holds the objects for its cells. I allocate and init the mutable array,
itemList = [[NSMutableArray alloc] init];
and add the objects into the array and the table view is loaded.
Now i need to dealloc the whole array and allocate again to hold a new array of objects to be shown in the table view. Here is what i am doing
if(self.itemList != nil) { [self.itemList removeAllObjects]; [self.itemList release];
}
self.itemList = [[NSMutableArray alloc] init];
and then add the objects into the array to show in the table view.
I am calling the [tableview reloadData];
The table loads properly but after this occurrs three or four times my app crashes
Now, 1. when i check the retain count after alloc called it shows 2 y? 2. My app crashes after some time with error "iphone Program received signal: “0”. warning: check_safe_call: could not restore current frame"
I suspect the itemList has not been deallocated properly.
Can any one guide me please?