issue modally presenting a table view controller that has a search display controller and returning the selected cell

in my iOS application, i'm wanting to present the user a table of items using a UITableViewController, have them select an item, then return that item back to the another view controller. i can do this successfully by defining a protocol and delegate method for the table view controller, presenting the table view controller modally, then dismissing it when the user selects an item and returning the item to the delegate view controller. but, if i also implement a search display controller for the table view (so the user can search for a specific item in a longer list) i run into a memory issue. i've modified apple's 'TableSearch' example to demonstrate this, and have posted the code at

in short, the app usually crashes with an EXC_BAD_ACCESS just after selecting a cell in the table view. running it with NSZombieEnabled is indicating that the table view controller is being called by -[UISearchDisplayController _destroyManagedTableView] after its retain count has reached 0. anyone have an idea why this is happening? i don't think i'm doing any additional releasing of the table view controller beyond what i'm responsible for. i create it using alloc and initWithNibName, present it modally, then imediately release it (see -(IBAction)showProductPicker:(id)sender in the 'PickProductViewController.m' file in my example). thanks!


the answer posted by Jeff to How can UISearchDisplayController autorelease cause crash in a different view controller? solves the problem.

Need Your Help

How do I correctly use Nexus and Maven/Jenkins for a 3rd Party library (not in Maven Repository) and a necessary p2 repository

maven jenkins nexus p2 tycho

we use Jenkins/Maven for BuildManagement and Continuous Integration. Managing 3rd party libraries should be handled by the Nexus Server we set up.