From 5e657aadeea9f856b6f1c3c7c8af94b13b16ac78 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Wed, 9 Sep 2015 17:35:53 +0200 Subject: [PATCH] Fix Finder crashing when showing the context menu on OS X <= 10.9 OwnCloudFinderRequestManager::_shareMenuTitle was not retained anymore after the FinderSync refactoring which would cause it to contain any kind of garbage value for some reason. Fix the issue by also enabling ARC for RequestManager.m. We can't enable ARC for the whole project since Finder.h is included by many .m files and it's not trivial to port to ARC. --- .../OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj | 2 +- shell_integration/MacOSX/OwnCloudFinder/RequestManager.m | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj b/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj index ccd1edaae..a0aba6a39 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj +++ b/shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj @@ -12,7 +12,7 @@ 692C18A516660C4700BF6A53 /* ContextMenuHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18A416660C4600BF6A53 /* ContextMenuHandlers.m */; }; 692C18A9166617F500BF6A53 /* IconOverlayHandlers.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18A8166617F500BF6A53 /* IconOverlayHandlers.m */; }; 692C18AC1666392700BF6A53 /* MenuManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 692C18AB1666392700BF6A53 /* MenuManager.m */; }; - 6993878616494C000044E4DF /* RequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6993878516494C000044E4DF /* RequestManager.m */; }; + 6993878616494C000044E4DF /* RequestManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6993878516494C000044E4DF /* RequestManager.m */; settings = {COMPILER_FLAGS = "-fobjc-arc"; }; }; 69948B361636D50E0093B6CE /* ContentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 69948B351636D50E0093B6CE /* ContentManager.m */; }; 8C37DD9F161593BD00016A95 /* FinderHook.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C37DD9A161593BD00016A95 /* FinderHook.m */; }; 8C37DDB2161593FF00016A95 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C37DDB1161593FF00016A95 /* Cocoa.framework */; }; diff --git a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m index 79be861cf..f217b59d6 100644 --- a/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m +++ b/shell_integration/MacOSX/OwnCloudFinder/RequestManager.m @@ -49,11 +49,7 @@ static OwnCloudFinderRequestManager* sharedInstance = nil; - (void)dealloc { - [_syncClientProxy release]; - sharedInstance = nil; - - [super dealloc]; } + (OwnCloudFinderRequestManager*)sharedInstance @@ -137,7 +133,6 @@ static OwnCloudFinderRequestManager* sharedInstance = nil; // NSLog(@"Socket DISconnected! %@", [err localizedDescription]); // clear the registered pathes. - [_registeredPathes release]; _registeredPathes = [[NSMutableDictionary alloc] init]; [_requestedPaths removeAllObjects]; -- 2.30.2