Fix Finder crashing when showing the context menu on OS X <= 10.9
authorJocelyn Turcotte <jturcotte@woboq.com>
Wed, 9 Sep 2015 15:35:53 +0000 (17:35 +0200)
committerJocelyn Turcotte <jturcotte@woboq.com>
Wed, 9 Sep 2015 15:45:24 +0000 (17:45 +0200)
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.

shell_integration/MacOSX/OwnCloudFinder/OwnCloudFinder.xcodeproj/project.pbxproj
shell_integration/MacOSX/OwnCloudFinder/RequestManager.m

index ccd1edaae709f2ee0519c763176997dec569e7bb..a0aba6a39f9ac1bfc8a048b9ae55a7e5c86d9e6c 100644 (file)
@@ -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 */; };
index 79be861cfbe8c55f364d65abc789cb8044e95248..f217b59d6b9e2c7471c21b47d73f764e60e26b68 100644 (file)
@@ -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];