Setting a picture in a UIImageView produces reminiscence leaks.
I attempted to do it in 3 ways and all of them produce reminiscence leaks.
@IBOutlet weak var imageCategory: UIImageView!
func firstTry() {
let url = Bundle.foremost.url(forResource: "biceps", withExtension: "png")
let imageData = attempt! Information(contentsOf: url!)
myImage.picture = UIImage(information: imageData)
}
func secondTry() {
myImage.picture = UIImage(named: biceps)
}
func thirdTry() {
let path = Bundle.foremost.path(forResource: "biceps", ofType: nil)
myImage.picture = UIImage(contentsOfFile: path!)
}
There are reminiscence leaks