1
0
mirror of https://github.com/Toxblh/MTMR.git synced 2026-01-11 17:38:38 +00:00

+ deinit inputsource observer

This commit is contained in:
ad 2018-04-30 00:57:32 +03:00
parent 788927edb3
commit 6b553c4d0d

View File

@ -31,6 +31,10 @@ class InputSourceBarItem: CustomButtonTouchBarItem {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
deinit {
CFNotificationCenterRemoveEveryObserver(notificationCenter, UnsafeRawPointer(Unmanaged.passUnretained(self).toOpaque()));
}
@objc override func handleGestureSingle(gr: NSClickGestureRecognizer) { @objc override func handleGestureSingle(gr: NSClickGestureRecognizer) {
super.handleGestureSingle(gr: gr) super.handleGestureSingle(gr: gr)
switchInputSource() switchInputSource()