A small messages table should display attachments and respond to a button tap inside the cell. After the cell is configured again, the action should apply only to the current attachment and should not keep old objects around longer than necessary.
UITableView and a reusable cell to display one message attachment.configure(with:onOpen:).Open button is tapped, the handler must be called with the current Attachment.AttachmentCell and call configure(with:onOpen:) for attachment A.configure(with:onOpen:) again for attachment B on the same cell.Open.prepareForReuse() and check whether it still calls the old handler after reuse.-swift-version 6@MainActor UI code, deterministic tests with local mock objects, no network or async system APIsUse line comments to explain the problem, its impact, the fix and how to test it.