Question

I would like, given the indexPath, to get a reference to the related cell to remove the checkmark. I thought I could use the cellForRowAtIndexPath for this, but I get the message:

__NSAutoreleaseNoPool(): Object 0x685a600 of class UITableView autoreleased with no pool in place - just leaking

even for a simple line like this:

[self.tableView cellForRowAtIndexPath:indexPath];

So, this is not only returning a pointer to a cell, right? Maybe I'm misunderstanding what this method is for. Is it possible to simply get a reference to a cell to change the accessoryView? Thanks!

Was it helpful?

Solution

This error: _NSAutoreleaseNoPool() is generally related to exactly this - not having an Auto release pool in place. Autoreleasepools are thread-based, so if you are executing this in the background or on another thread (hard to tell from this little code) you'll need to create an NSAutoreleasPool in that thread and release it after you're done with your execution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top