iOS 7 Bugs – message sent to deallocated instance

First of all, I know this error has been around way before iOS 7. However, in one of my own apps I started getting this error when I upgraded it to iOS 7 SDK. Not exactly sure why it started since it worked perfectly fine with iOS 6 SDK. After hours of debugging, I finally found a solution that stopped the crashing from this dreaded “message sent to deallocated instance” error. The solution was to set my delegates and datasources to nil in the dealloc method.

- (void)dealloc
        self.tableView.delegate = nil;
        self.tableView.dataSource = nil;

I hope this ends your “message sent to deallocated instance” headache.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Please Do the Math      

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: