views:

35

answers:

1

For the life of me, I cannot figure this out.

Here's the scenario: I have a tableview with a searchbar at the top. I do a search. I tap a search scope button. Do another search. Tap the other search scope button (the one that was selected by default). Do another search.

Crash

I'm presented with the following:

*** -[CALayer retain]: message sent to deallocated instance 0x4c7fa20

and it points to the following line of code:

[self.tableView reloadData];

I'm not releasing the array I use for the tableview data until the file's dealloc method.

Any ideas? I'm at a loss here. :confused:

A: 

Try setting NSZombieEnabled. That should give you a handle on exactly what is being over-released.

William Jockusch
It was already enabled when I got that weird error.
Mike P
Try setting a breakpoint before the crash, then step as slowly as you can until you see where the crash actually happens. Sometimes it's not at the point shown by the debugger. It may also be helpful to set breakpoints within the reload, i.e. in cellForRowAtIndexPath and other methods that are called as it recreates the table view.
William Jockusch