You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting a memory leak using instruments that goes away as soon as I comment out the KeyCombo dictionary extension... below is the code I am using - any chance you can take a look?
deployment target: 10.15
xcode version: 11.2
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
var myHotkey: HotKey? {
didSet {
guard let myHotkey = myHotkey else { return }
myHotkey.keyDownHandler = { [weak self] in
self?.hotkeyHandler()
}
}
}
var num: Int = 0
func applicationDidFinishLaunching(_ aNotification: Notification) {
self.myHotkey = HotKey(carbonKeyCode: UInt32(47), carbonModifiers: UInt32(2304))
}
func hotkeyHandler() {
self.num += 1
print("hotkey pressed \(num) times")
}
}
The text was updated successfully, but these errors were encountered:
I am getting a memory leak using instruments that goes away as soon as I comment out the KeyCombo dictionary extension... below is the code I am using - any chance you can take a look?
deployment target: 10.15
xcode version: 11.2
The text was updated successfully, but these errors were encountered: