Work around for several strange corner cases in Automatic Reference Counting in Apple's runtime
This commit is contained in:
@@ -42,8 +42,13 @@ class NetworkMonitor: NSObject {
|
||||
let filePath = dataFile()
|
||||
|
||||
if NSFileManager.defaultManager().fileExistsAtPath(filePath) {
|
||||
self.savedNetworks = NSKeyedUnarchiver.unarchiveObjectWithFile(filePath) as! [Network]
|
||||
let networks = NSKeyedUnarchiver.unarchiveObjectWithFile(filePath) as! [Network]
|
||||
|
||||
self.savedNetworks.removeAll()
|
||||
|
||||
for n in networks {
|
||||
self.savedNetworks.append(n)
|
||||
}
|
||||
}
|
||||
|
||||
ServiceCom.getNetworkList() { (networkList) -> Void in
|
||||
|
||||
Reference in New Issue
Block a user