在对我的应用程序进行内存泄漏分析时,仪器会在以下代码中显示泄漏-
let viewController = (UIStoryboard.init(name: "Main", bundle: nil)).instantiateViewController(withIdentifier: "HistoryView") as! HistoryViewController
这是我使用此代码的方法-
@objc func historyButtonAction(sender : UIButton)
{
let viewController = (UIStoryboard.init(name: "Main", bundle: nil)).instantiateViewController(withIdentifier: "HistoryView") as! HistoryViewController
viewController.account = self.account;
self.navigationController?.pushViewController(viewController, animated: true);
}
无法解决此泄漏。希望能对您有所帮助。