+ deinit inputsource observer

This commit is contained in:
ad
2018-04-30 00:57:32 +03:00
parent 788927edb3
commit 6b553c4d0d
+4
View File
@@ -31,6 +31,10 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
fatalError("init(coder:) has not been implemented")
}
deinit {
CFNotificationCenterRemoveEveryObserver(notificationCenter, UnsafeRawPointer(Unmanaged.passUnretained(self).toOpaque()));
}
@objc override func handleGestureSingle(gr: NSClickGestureRecognizer) {
super.handleGestureSingle(gr: gr)
switchInputSource()