let cell = tableView.dequeueReusableCell(withIdentifier: "CellIdentifier", for: indexPath) as! SomeCell
print("cell: \(Unmanaged.passUnretained(cell).toOpaque()) with indexPath [\(indexPath.section), \(indexPath.row)]");
After tableView reloaded the indexPath twice, sometimes it returned me different memory address.
However I only have one that type of cell in the tableView. Anyone could explain me why dequeue function return different instances ?
Looks like I found the reason
Apple Doc
Reloading a row causes the table view to ask its data source for a new cell for that row. The table animates that new cell in as it animates the old row out. Call this method if you want to alert the user that the value of a cell is changing. If, however, notifying the user is not important—that is, you just want to change the value that a cell is displaying—you can get the cell for a particular row and set its new value.