From 9af085242bda9ad4da78ef23e9d4ed180aa2c629 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Wed, 9 Jan 2013 01:50:38 +0000 Subject: Use ARC in 64-bit mode on the Mac. Register when we drag a disc image (or double click) to Pcsxr in the recent menu. Comment out ReleasePlugins() in SysClose: it was causing a pointer to be released twice when you changed a plug-in (specifically, the GPU). Cleaning up the Recent items code. One notable case is only releasing objects we have ownership of (this is pointless in ARC, but necessary in 32-bit code). Had to rewrite -[PluginList setActivePlugin:forType:] because the previous version wasn't ARC-friendly. If we select a disc while the emulator is running, load the disc into the current session. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@82136 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/PcsxrMemoryObject.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'macosx/PcsxrMemoryObject.m') diff --git a/macosx/PcsxrMemoryObject.m b/macosx/PcsxrMemoryObject.m index 3cbb04b4..e8e20589 100755 --- a/macosx/PcsxrMemoryObject.m +++ b/macosx/PcsxrMemoryObject.m @@ -10,6 +10,7 @@ #import #import #import +#import "ARCBridge.h" @implementation PcsxrMemoryObject @@ -44,10 +45,10 @@ #endif NSImage *theImage = [[NSImage alloc] init]; [theImage addRepresentation:imageRep]; - [imageRep release]; + RELEASEOBJ(imageRep); [theImage setScalesWhenResized:YES]; [theImage setSize:NSMakeSize(32, 32)]; - return [theImage autorelease]; + return AUTORELEASEOBJ(theImage); } - (id)initWithMcdBlock:(McdBlock *)infoBlock @@ -55,7 +56,7 @@ if (self = [super init]) { englishName = [[NSString alloc] initWithCString:infoBlock->Title encoding:NSASCIIStringEncoding]; sjisName = [[NSString alloc] initWithCString:infoBlock->sTitle encoding:NSShiftJISStringEncoding]; - memImage = [[PcsxrMemoryObject imageFromMcd:infoBlock->Icon] retain]; + memImage = RETAINOBJ([PcsxrMemoryObject imageFromMcd:infoBlock->Icon]); memName = [[NSString alloc] initWithCString:infoBlock->Name encoding:NSASCIIStringEncoding]; memID = [[NSString alloc] initWithCString:infoBlock->ID encoding:NSASCIIStringEncoding]; memIconCount = infoBlock->IconCount; @@ -84,6 +85,7 @@ @synthesize memID; @synthesize memIconCount; +#if !__has_feature(objc_arc) - (void)dealloc { [englishName release]; @@ -94,6 +96,7 @@ [super dealloc]; } +#endif - (NSString *)description { -- cgit v1.2.3