views:

34

answers:

0

Hi there,

I have a TabBarController, which contains 4 tabs with a UITableView init. The content of each table view is downloaded from server. There is no problem, if I switch tabs slowly. But if I switch tab a bit faster, I always get the "message sent do deallocated instance" when I insert rows into table, following is the insert code:

[self.tableView  beginUpdates];
[self.tableView insertRowsAtIndexPaths:iPaths withRowAnimation:UITableViewRowAnimationNone];
[self.tableView  endUpdates];

I also added "NSZombieEnabled" and "NSAutoreleaseFreedObjectCheckEnabled" to the arguments of executables, and set them to YES. Here is the methods which always access the deallocated instance:

-[UIViewAnimationContext animationCount]
-[UIViewAnimationState sendDelegateAnimationDidStop:finished:] 
-[UIViewAnimationState retain] 

I also removed all the warning from "Build & Analyze". But still have the same problem.

Anybody can help me find a way out? Thanks! Stellit