메모리·ARC주관식
unowned 크래시 시나리오
UITableView 셀에서 이미지를 비동기로 싣는 아래 코드는 가끔 크래시합니다. 어떤 조건에서, 왜 크래시하나요?
final class ImageCell: UITableViewCell {
func load(_ url: URL) {
loader.fetch(url) { [unowned self] image in
self.imageView?.image = image
}
}
}