mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 02:27:38 -07:00
the quest for leaks is over.
Why a singleton doesn't leak, vs calling static methods on a class is beyond me
This commit is contained in:
parent
78e5a00a68
commit
f54d5e9e8f
6 changed files with 36 additions and 37 deletions
|
@ -50,6 +50,7 @@ class NetworkMonitor: NSObject {
|
|||
}
|
||||
|
||||
func updateNetworkInfo() {
|
||||
//NSLog("updateNetworkInfo")
|
||||
let filePath = dataFile()
|
||||
|
||||
if NSFileManager.defaultManager().fileExistsAtPath(filePath) {
|
||||
|
@ -62,7 +63,7 @@ class NetworkMonitor: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
ServiceCom.getNetworkList() { (networkList) -> Void in
|
||||
ServiceCom.sharedInstance.getNetworkList() { (networkList) -> Void in
|
||||
self.receivedNetworks = networkList
|
||||
|
||||
NSOperationQueue.mainQueue().addOperationWithBlock() { () -> Void in
|
||||
|
@ -70,7 +71,7 @@ class NetworkMonitor: NSObject {
|
|||
}
|
||||
}
|
||||
|
||||
ServiceCom.getNodeStatus() { nodeStatus -> Void in
|
||||
ServiceCom.sharedInstance.getNodeStatus() { nodeStatus -> Void in
|
||||
NSOperationQueue.mainQueue().addOperationWithBlock() { () -> Void in
|
||||
let nc = NSNotificationCenter.defaultCenter()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue