UITableViewCell dequeueReusableCell中的内存泄漏

时间:2019-09-30 11:20:20

标签: ios swift uitableview memory-leaks

我在dequeueReusableCell上遇到内存泄漏。我知道一个保留计数没有释放。下面是我的代码和错误捕捉。

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    if let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: CustomCell.self)) as? CustomCell {
        return cell
    } else {
        return UITableViewCell.init()
    }
}

仪器快照:

enter image description here

0 个答案:

没有答案