From 34b81698952d9c8f7e3b44c518af5293ba1dc530 Mon Sep 17 00:00:00 2001 From: michael starke Date: Thu, 27 Mar 2014 22:21:15 +0100 Subject: [PATCH] Fixed memory management issue with KeyMapper Disabled badge icon until all quirks are sorted --- MacPass/MPAppDelegate.m | 2 +- MacPass/MPKeyMapper.m | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MacPass/MPAppDelegate.m b/MacPass/MPAppDelegate.m index 8e62885b..0bd01d0c 100644 --- a/MacPass/MPAppDelegate.m +++ b/MacPass/MPAppDelegate.m @@ -149,7 +149,7 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi serverDaemon = [[MPServerDaemon alloc] init]; lockDaemon = [[MPLockDaemon alloc] init]; autotypeDaemon = [[MPAutotypeDaemon alloc] init]; - dockTileHelper = [[MPDockTileHelper alloc] init]; + //dockTileHelper = [[MPDockTileHelper alloc] init]; } - (NSString *)applicationName { diff --git a/MacPass/MPKeyMapper.m b/MacPass/MPKeyMapper.m index 32ccc292..5c68e0b8 100644 --- a/MacPass/MPKeyMapper.m +++ b/MacPass/MPKeyMapper.m @@ -61,7 +61,8 @@ uint16_t const kMPUnknownKeyCode = UINT16_MAX; static NSMutableDictionary *keyboardCodeDictionary; TISInputSourceRef currentKeyboard = TISCopyCurrentKeyboardInputSource(); - NSString *localizedName = CFBridgingRelease(TISGetInputSourceProperty(currentKeyboard, kTISPropertyLocalizedName)); + NSString *localizedName = (__bridge NSString *)TISGetInputSourceProperty(currentKeyboard, kTISPropertyLocalizedName); + CFRelease(currentKeyboard); if(keyboardCodeDictionary == nil) { /* Input source should not change that much while we are running */