0

I'am using SnapKit 3.2.0. When I use snapkit in my project, it shows a memory issue in the Memory Graph of Xcode.

I created a very simple project at here.

let cell = UITableViewCell()
let label = UILabel()
label.text = "Hello World"
cell.contentView.addSubview(label)
label.snp.makeConstraints { maker in
    maker.centerX.centerY.equalToSuperview()
}

Above is all the code I set. The memory warning makes me a a little crazy. So how to get rid of it ?

Vitreous-Flower
  • 257
  • 3
  • 18
  • Are you sure it's related to SnapKit? Because, clearly, not coding the reusing of cells, is clearly not recommended. – Larme Apr 27 '17 at 14:57
  • Since there are only 5 cells in the project, it shouldn't be a problem of reusing of cell. When I comment the last 3 lines of code above, the memory warning just disappear. How to explain it ? – Vitreous-Flower Apr 27 '17 at 15:12
  • I have updated the sample project. It fully explains my problem right now. – Vitreous-Flower Apr 27 '17 at 15:23
  • Could this be related: https://github.com/SnapKit/SnapKit/issues/310 ? – Larme Apr 27 '17 at 15:29

0 Answers0