When you store optional URL in some class, then this URL causes leak. Please see simple code below. Leaks appear in libswiftCore and in CoreFoundation. This only happens on real device - not in simulator.
classViewController: UIViewController {
overridefuncviewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.leturl = URL(string: "http://google.com/asd")
print(url)
t = Test(url: url!)
}
vart: Test?
}
classTest {
leturl: URL!
init(url: URL) {
self.url = url
}
}
The text was updated successfully, but these errors were encountered:
I suspect it was a mismatch between Swift and the remote mirrors library on the device. This explains why it worked in the simulator as well, because there we use Swift's copy of the library.
Attachment: Download
Environment
Xcode 10, iOS 12, Swift 4.2
Additional Detail from JIRA
md5: 5d2a2fd97aae3377acab62a62ee39f43
Issue Description:
When you store optional URL in some class, then this URL causes leak. Please see simple code below. Leaks appear in libswiftCore and in CoreFoundation. This only happens on real device - not in simulator.
The text was updated successfully, but these errors were encountered: