I have a demo project on GitHub that is demonstrating a memory leak in iOS 13.5 with Accessory Detail Buttons on Custom Table View Cells.
This is a very simple app that I’ve built just for demonstrating this problem—however you could easily recreate it yourself:
- Create Single View App XCode iOS Project
- Embed existing View Controller inside a Navigation Controller
- Add a
TableViewController
and a Segue fromViewController
toTableViewController
- Subclass
UITableViewController
andUITableViewCell
- Set classes in Interface Builder
- Set Reuse Identifier
- Set Cell Accessory to Detail in Interface Builder
- Add dummy data
- Configure cell
The memory is leaking on the TableViewController
. Just navigate to the TableViewController
and then back to the ViewController
.
I’m not sure why I’m running into this leak. The project looks just fine to me. Am I doing something wrong or is this a bug in iOS? Custom Table View Cells should be supporting Accessory View—right?