Hi
I thought I was doing the right thing putting [unowned self] in a closure that references self and is stored in an object that is a property of the object
private var tableHandler: DataTableHandler?
override public func viewDidLoad()
{
super.viewDidLoad()
setFittingHeight(self)
if let records = records {
records.load()
let tableHandler = DataTableHandler(cellIndentifier: recordCellIdentifier, array: records)
tableHandler.tableView = recordsTableView
tableHandler.afterSelect =
{ [unowned self] _ in self.dismissViewControllerAnimated(true, completion: nil) }
self.tableHandler = tableHandler
recordsTableView.reloadData()
}
editingChanged(newRecordTextField)
}// viewDidLoad
But every so often, at the [unowned self] line I get a crash, with 1 swift_unknownRetainUnowned and 0 _swift_abortRetainUnowned appearing on the stack of Thread 1.
Can anyone see what the problem might be?
I'm using XCode 6.4
Regards
Mark