mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-20 21:33:57 -07:00
Work around for several strange corner cases in Automatic Reference Counting in Apple's runtime
This commit is contained in:
parent
decb4261d4
commit
ba0a45365c
5 changed files with 19 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue