I'm trying to understand how xcode debugging tool works in terms of detecting retain cycles. I have a simple Parent and Child view controllers both holds references to each other. And after executing app opening closing VC several time, when I open debugging tool it neither shows that there is an issue with retain cycle nor runtime issue. Please find below the code example and attached screenshot of xcode debugging tool
class ViewController: UIViewController {
var child: ChildViewController?
@IBAction func open(_ sender: Any) {
performSegue(withIdentifier: "segueChild", sender: nil)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if (segue.identifier == "segueChild") {
child = segue.destination as? ChildViewController
child?.parentVC = self
}
}
}
class ChildViewController: UIViewController {
var parentVC: ViewController?
@IBAction func close(_ sender: Any) {
dismiss(animated: true, completion: nil)
}
}