<div dir="ltr"><span style="font-size:12.8px">And sqUnixITimerHeartbeat.c?</span><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 1, 2015 at 4:02 PM,  <span dir="ltr">&lt;<a href="mailto:commits@squeakvm.org" target="_blank">commits@squeakvm.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
Revision: 3481<br>
Author:   johnmci<br>
Date:     2015-11-01 16:02:54 -0800 (Sun, 01 Nov 2015)<br>
Log Message:<br>
-----------<br>
JMM - adjustments to arc/nonarc via Nicolas Cellier, 64bit cleanup, fix zombie at quit time SQK-21<br>
<br>
Modified Paths:<br>
--------------<br>
    branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcodeproj/project.pbxproj<br>
    branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcworkspace/xcuserdata/johnmci.xcuserdatad/UserInterfaceState.xcuserstate<br>
    branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjcCog.xcodeproj/project.xcworkspace/xcuserdata/johnmci.xcuserdatad/UserInterfaceState.xcuserstate<br>
    branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjc_Prefix.pch<br>
    branches/Cog/platforms/Mac OS/plugins/MIDIPlugin/sqMacMIDI.c<br>
    branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h<br>
    branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m<br>
    branches/Cog/platforms/iOS/plugins/MIDIPlugin/sqMacMIDI.m<br>
    branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m<br>
    branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h<br>
    branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m<br>
    branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/Queue.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m<br>
    branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m<br>
    branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.m<br>
    branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m<br>
    branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m<br>
    branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m<br>
    branches/Cog/platforms/iOS/vm/SqueakPureObjc_Prefix.pch<br>
    branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.c<br>
    branches/Cog/platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c<br>
    branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c<br>
<br>
Modified: branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcodeproj/project.pbxproj<br>
===================================================================<br>
--- branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcodeproj/project.pbxproj  2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcodeproj/project.pbxproj  2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -11,9 +11,9 @@<br>
                9402DD7010CE0E91005C2102 /* SqViewClut.m in Sources */ = {isa = PBXBuildFile; fileRef = 9402DD6F10CE0E91005C2102 /* SqViewClut.m */; };<br>
                9422C3B51AFFFAC500448DC0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9422C3B31AFFFAC500448DC0 /* Localizable.strings */; };<br>
                943B9CA11235C5120056205E /* sqMacHostWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 943B9C9E1235C5120056205E /* sqMacHostWindow.m */; };<br>
-               944154941BD595710062FCDE /* sqMacUnixExternalPrims.m in Sources */ = {isa = PBXBuildFile; fileRef = 946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */; settings = {ASSET_TAGS = (); }; };<br>
-               94502E951BB609AC00EA8942 /* sqUnixSpurMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = 94502E941BB609AC00EA8942 /* sqUnixSpurMemory.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94502E971BB71A9200EA8942 /* sqSqueakMainApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */; settings = {ASSET_TAGS = (); }; };<br>
+               944154941BD595710062FCDE /* sqMacUnixExternalPrims.m in Sources */ = {isa = PBXBuildFile; fileRef = 946DA9FF10C0D35500F26F56 /* sqMacUnixExternalPrims.m */; };<br>
+               94502E951BB609AC00EA8942 /* sqUnixSpurMemory.c in Sources */ = {isa = PBXBuildFile; fileRef = 94502E941BB609AC00EA8942 /* sqUnixSpurMemory.c */; };<br>
+               94502E971BB71A9200EA8942 /* sqSqueakMainApplication+imageReadWrite.m in Sources */ = {isa = PBXBuildFile; fileRef = 94A0E8840DE5EF430071C8B9 /* sqSqueakMainApplication+imageReadWrite.m */; };<br>
                94584FDB10F02378001401E7 /* sqMacExtendedClipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = 94584FD910F02378001401E7 /* sqMacExtendedClipboard.m */; };<br>
                9463C1BF1AEE13F3009C5CE5 /* ADPCMCodecPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E40DDD03FE00358328 /* ADPCMCodecPlugin.c */; };<br>
                9463C1C01AEE145C009C5CE5 /* B2DPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658E60DDD03FE00358328 /* B2DPlugin.c */; };<br>
@@ -171,11 +171,11 @@<br>
                949382791B001C7A00C802B2 /* sqSqueakOSXInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 94BCAE6810ACA10100F87527 /* sqSqueakOSXInfoPlistInterface.m */; };<br>
                9493827A1B001C7E00C802B2 /* sqSqueakInfoPlistInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = 9412CAE50E6C05EC00DB8625 /* sqSqueakInfoPlistInterface.m */; };<br>
                94B9533510E6BD7100DC476A /* MacMenuOS9ToOSX.m in Sources */ = {isa = PBXBuildFile; fileRef = 94B9533410E6BD7100DC476A /* MacMenuOS9ToOSX.m */; };<br>
-               94BB096E1BB47DDB0016BFDF /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BB096B1BB47DDB0016BFDF /* Security.framework */; settings = {ASSET_TAGS = (); }; };<br>
+               94BB096E1BB47DDB0016BFDF /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BB096B1BB47DDB0016BFDF /* Security.framework */; };<br>
                94BB09721BB47F9B0016BFDF /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BB09711BB47F9B0016BFDF /* libz.tbd */; };<br>
                94BB09741BB47FB20016BFDF /* libstdc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BB09731BB47FB20016BFDF /* libstdc++.tbd */; };<br>
                94BB09761BB47FCD0016BFDF /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BB09751BB47FCD0016BFDF /* libc++.tbd */; };<br>
-               94BB09781BB480AC0016BFDF /* HostWindowPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658FA0DDD03FE00358328 /* HostWindowPlugin.c */; settings = {ASSET_TAGS = (); }; };<br>
+               94BB09781BB480AC0016BFDF /* HostWindowPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E658FA0DDD03FE00358328 /* HostWindowPlugin.c */; };<br>
                94C315341AD4949B0096E59D /* AsynchFilePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94C315311AD4949B0096E59D /* AsynchFilePlugin.c */; };<br>
                94C317511AD495CD0096E59D /* JoystickTabletPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94C317491AD495CD0096E59D /* JoystickTabletPlugin.c */; };<br>
                94C317541AD495CD0096E59D /* LocalePlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94C3174B1AD495CD0096E59D /* LocalePlugin.c */; };<br>
@@ -191,14 +191,14 @@<br>
                94D921571AC6321800A5970F /* LargeIntegers.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659040DDD03FE00358328 /* LargeIntegers.c */; };<br>
                94D921581AC6321E00A5970F /* ZipPlugin.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6591F0DDD03FE00358328 /* ZipPlugin.c */; };<br>
                94D9215B1AC6337D00A5970F /* sqManualSurface.c in Sources */ = {isa = PBXBuildFile; fileRef = 94BD816F11C8A58D00556751 /* sqManualSurface.c */; };<br>
-               94F478C91BB527440069E57B /* gcc3x-cointerp.c in Sources */ = {isa = PBXBuildFile; fileRef = 94F478C51BB527440069E57B /* gcc3x-cointerp.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94F478D01BB52D8D0069E57B /* cogitIA32.c in Sources */ = {isa = PBXBuildFile; fileRef = 94F478CA1BB52D3A0069E57B /* cogitIA32.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94FA4CD51BB4D43900C1BE8F /* b3dAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659980DDD053900358328 /* b3dAlloc.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94FA4CD61BB4D43900C1BE8F /* b3dDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599A0DDD053900358328 /* b3dDraw.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94FA4CD71BB4D43900C1BE8F /* b3dMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599C0DDD053900358328 /* b3dMain.c */; settings = {ASSET_TAGS = (); }; };<br>
-               94FA4CD81BB4D43900C1BE8F /* b3dRemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599D0DDD053900358328 /* b3dRemap.c */; settings = {ASSET_TAGS = (); }; };<br>
+               94F478C91BB527440069E57B /* gcc3x-cointerp.c in Sources */ = {isa = PBXBuildFile; fileRef = 94F478C51BB527440069E57B /* gcc3x-cointerp.c */; };<br>
+               94F478D01BB52D8D0069E57B /* cogitIA32.c in Sources */ = {isa = PBXBuildFile; fileRef = 94F478CA1BB52D3A0069E57B /* cogitIA32.c */; };<br>
+               94FA4CD51BB4D43900C1BE8F /* b3dAlloc.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E659980DDD053900358328 /* b3dAlloc.c */; };<br>
+               94FA4CD61BB4D43900C1BE8F /* b3dDraw.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599A0DDD053900358328 /* b3dDraw.c */; };<br>
+               94FA4CD71BB4D43900C1BE8F /* b3dMain.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599C0DDD053900358328 /* b3dMain.c */; };<br>
+               94FA4CD81BB4D43900C1BE8F /* b3dRemap.c in Sources */ = {isa = PBXBuildFile; fileRef = 94E6599D0DDD053900358328 /* b3dRemap.c */; };<br>
                94FA4CE31BB4DD9000C1BE8F /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94329ECA12275FFA0090298B /* OpenGL.framework */; };<br>
-               94FA4CE51BB4DE1400C1BE8F /* Images-2.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 94FA4CE41BB4DE1400C1BE8F /* Images-2.xcassets */; settings = {ASSET_TAGS = (); }; };<br>
+               94FA4CE51BB4DE1400C1BE8F /* Images-2.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 94FA4CE41BB4DE1400C1BE8F /* Images-2.xcassets */; };<br>
                94FE5EC31B7A6232000D6014 /* sqSqueakOSXCGView.m in Sources */ = {isa = PBXBuildFile; fileRef = 94FE5EC21B7A6232000D6014 /* sqSqueakOSXCGView.m */; };<br>
 /* End PBXBuildFile section */<br>
<br>
@@ -1862,7 +1862,6 @@<br>
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;<br>
                                CLANG_ENABLE_OBJC_ARC = NO;<br>
                                CLANG_USE_OPTIMIZATION_PROFILE = NO;<br>
-                               CODE_SIGN_IDENTITY = &quot;Developer ID Application&quot;;<br>
                                COMBINE_HIDPI_IMAGES = YES;<br>
                                FRAMEWORK_SEARCH_PATHS = (<br>
                                        &quot;$(inherited)&quot;,<br>
@@ -1886,7 +1885,7 @@<br>
                                OTHER_CFLAGS = &quot;&quot;;<br>
                                PRODUCT_BUNDLE_IDENTIFIER = org.squeak.osx3286.cog;<br>
                                PRODUCT_NAME = Squeak;<br>
-                               PROVISIONING_PROFILE = &quot;a81f3cd0-20de-4e0b-b7a8-a98bcd57ec0c&quot;;<br>
+                               PROVISIONING_PROFILE = &quot;&quot;;<br>
                        };<br>
                        name = Debug;<br>
                };<br>
@@ -1897,7 +1896,6 @@<br>
                                ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;<br>
                                CLANG_ENABLE_OBJC_ARC = NO;<br>
                                CLANG_USE_OPTIMIZATION_PROFILE = NO;<br>
-                               CODE_SIGN_IDENTITY = &quot;Developer ID Application&quot;;<br>
                                COMBINE_HIDPI_IMAGES = YES;<br>
                                FRAMEWORK_SEARCH_PATHS = (<br>
                                        &quot;$(inherited)&quot;,<br>
<br>
Modified: branches/Cog/build.macos32x86/squeak.cog.spur/SqueakCogSpur32x86.xcworkspace/xcuserdata/johnmci.xcuserdatad/UserInterfaceState.xcuserstate<br>
===================================================================<br>
(Binary files differ)<br>
<br>
Modified: branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjcCog.xcodeproj/project.xcworkspace/xcuserdata/johnmci.xcuserdatad/UserInterfaceState.xcuserstate<br>
===================================================================<br>
(Binary files differ)<br>
<br>
Modified: branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjc_Prefix.pch<br>
===================================================================<br>
--- branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjc_Prefix.pch   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/build.macos64x64/squeak.stack.spur/SqueakPureObjc_Prefix.pch   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -5,3 +5,15 @@<br>
 #ifdef __OBJC__<br>
     #import &lt;Cocoa/Cocoa.h&gt;<br>
 #endif<br>
+<br>
+#if __has_feature(objc_arc)<br>
+#define RELEASEOBJ(x)<br>
+#define RETAINOBJ(x) x<br>
+#define AUTORELEASEOBJ(x) x<br>
+#define SUPERDEALLOC<br>
+#else<br>
+#define RELEASEOBJ(x) [x release]<br>
+#define RETAINOBJ(x) [x retain]<br>
+#define AUTORELEASEOBJ(x) [x autorelease]<br>
+#define SUPERDEALLOC [super dealloc];<br>
+#endif<br>
\ No newline at end of file<br>
<br>
Modified: branches/Cog/platforms/Mac OS/plugins/MIDIPlugin/sqMacMIDI.c<br>
===================================================================<br>
--- branches/Cog/platforms/Mac OS/plugins/MIDIPlugin/sqMacMIDI.c        2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/Mac OS/plugins/MIDIPlugin/sqMacMIDI.c        2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -290,7 +290,7 @@<br>
        }<br>
 }<br>
<br>
-int sqMIDIGetPortName(int portNum, int namePtr, int length) {<br>
+int sqMIDIGetPortName(int portNum, char * namePtr, int length) {<br>
 /* Copy the name of the given MIDI port into the string at the given<br>
    address. Copy at most length characters, and return the number of<br>
    characters copied. Fail if there is no port of the given number.*/<br>
@@ -427,7 +427,7 @@<br>
        return 0;<br>
 }<br>
<br>
-int sqMIDIPortReadInto(int portNum, int count, int bufferPtr) {<br>
+int sqMIDIPortReadInto(int portNum, int count, char * bufferPtr) {<br>
 /* bufferPtr is the address of the first byte of a Smalltalk<br>
    ByteArray of the given length. Copy up to (length - 4) bytes<br>
    of incoming MIDI data into that buffer, preceded by a 4-byte<br>
@@ -456,7 +456,7 @@<br>
        return bytesRead + 4;<br>
 }<br>
<br>
-int sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time) {<br>
+int sqMIDIPortWriteFromAt(int portNum, int count, char *bufferPtr, int time) {<br>
 /* bufferPtr is the address of the first byte of a Smalltalk<br>
    ByteArray of the given length. Send its contents to the given<br>
    port when the MIDI clock reaches the given time. If time equals<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h 2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h 2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -30,6 +30,7 @@<br>
 /* The virtual machine proxy definition */<br>
 #include &quot;sqVirtualMachine.h&quot;<br>
 #ifdef BUILD_FOR_OSX<br>
+#import &lt;Cocoa/Cocoa.h&gt;<br>
 typedef NSPasteboard * CLIPBOARDTYPE;<br>
 #else<br>
 typedef UIPasteboard * CLIPBOARDTYPE;<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m 2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m 2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -75,8 +75,8 @@<br>
<br>
 void sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( CLIPBOARDTYPE inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength)<br>
 {<br>
-    NSString *formatType = [[[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
-    NSData* data = [[[NSData alloc ] initWithBytes: inData length: dataLength] AUTORELEASEOBJ];<br>
+    NSString *formatType = AUTORELEASEOBJ([[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding]);<br>
+    NSData* data = AUTORELEASEOBJ([[NSData alloc ] initWithBytes: inData length: dataLength]);<br>
     NSArray *arrayOfTypes = @[formatType];<br>
<br>
     [inPasteboard declareTypes: arrayOfTypes owner: nil];<br>
@@ -86,7 +86,7 @@<br>
<br>
 sqInt sqPasteboardCopyItemFlavorDataformatformatLength ( CLIPBOARDTYPE inPasteboard, char* format, sqInt formatLength)<br>
 {<br>
-    NSString *formatType = [[[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+    NSString *formatType = AUTORELEASEOBJ([[NSString alloc] initWithBytes: format length: formatLength encoding:  NSUTF8StringEncoding]);<br>
     NSArray *arrayOfTypes = @[formatType];<br>
     NSString     *type= [inPasteboard availableTypeFromArray: arrayOfTypes];<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/MIDIPlugin/sqMacMIDI.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/MIDIPlugin/sqMacMIDI.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/MIDIPlugin/sqMacMIDI.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -291,7 +291,7 @@<br>
        }<br>
 }<br>
<br>
-int sqMIDIGetPortName(int portNum, int namePtr, int length) {<br>
+int sqMIDIGetPortName(int portNum, char * namePtr, int length) {<br>
 /* Copy the name of the given MIDI port into the string at the given<br>
    address. Copy at most length characters, and return the number of<br>
    characters copied. Fail if there is no port of the given number.*/<br>
@@ -428,7 +428,7 @@<br>
        return 0;<br>
 }<br>
<br>
-int sqMIDIPortReadInto(int portNum, int count, int bufferPtr) {<br>
+int sqMIDIPortReadInto(int portNum, int count, char * bufferPtr) {<br>
 /* bufferPtr is the address of the first byte of a Smalltalk<br>
    ByteArray of the given length. Copy up to (length - 4) bytes<br>
    of incoming MIDI data into that buffer, preceded by a 4-byte<br>
@@ -457,7 +457,7 @@<br>
        return bytesRead + 4;<br>
 }<br>
<br>
-int sqMIDIPortWriteFromAt(int portNum, int count, int bufferPtr, int time) {<br>
+int sqMIDIPortWriteFromAt(int portNum, int count, char * bufferPtr, int time) {<br>
 /* bufferPtr is the address of the first byte of a Smalltalk<br>
    ByteArray of the given length. Send its contents to the given<br>
    port when the MIDI clock reaches the given time. If time equals<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m       2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m       2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -7,6 +7,7 @@<br>
 //<br>
<br>
 #import &quot;MacMenuOS9ToOSX.h&quot;<br>
+#import &lt;Cocoa/Cocoa.h&gt;<br>
<br>
<br>
 Boolean ioCheckMenuHandle(MenuHandle menuHandle) {<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h      2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h      2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -34,7 +34,7 @@<br>
<br>
<br>
 Boolean ioCheckMenuHandle(MenuHandle menuHandle);<br>
-#define TARGET_API_MAC_CARBON 1<br>
+//#define TARGET_API_MAC_CARBON 1<br>
 #define kHICommandHide &#39;hide&#39;<br>
<br>
 MenuRef GetMenuHandle(MenuID menuID);<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m     2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m     2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -59,6 +59,7 @@<br>
                        atom = [myInstance.soundOutQueue returnAndRemoveOldest];<br>
                        inBuffer-&gt;mAudioDataByteSize = (int) atom.byteCount;<br>
                        memcpy(inBuffer-&gt;mAudioData,atom.data,atom.byteCount);<br>
+            RELEASEOBJ(atom);<br>
 //NSLog(@&quot;%i Fill sound buffer with %i bytesA&quot;,ioMSecs(),inBuffer-&gt;mAudioDataByteSize);<br>
                } else {<br>
                        inBuffer-&gt;mAudioDataByteSize = (int) MIN(atom.byteCount - atom.startOffset,inBuffer-&gt;mAudioDataBytesCapacity);<br>
@@ -66,6 +67,7 @@<br>
                        atom.startOffset = atom.startOffset + inBuffer-&gt;mAudioDataByteSize;<br>
                        if (atom.startOffset == atom.byteCount) {<br>
                                atom = [myInstance.soundOutQueue returnAndRemoveOldest]; //ignore now it&#39;s empty<br>
+                RELEASEOBJ(atom);<br>
                        }<br>
 //NSLog(@&quot;%i Fill sound buffer with %i bytesB&quot;,ioMSecs(),inBuffer-&gt;mAudioDataByteSize);<br>
                }<br>
@@ -114,7 +116,7 @@<br>
                return;<br>
<br>
        if (inNumberPacketDescriptions &gt; 0) {<br>
-               soundAtom *atom = [[[soundAtom alloc] initWith: inBuffer-&gt;mAudioData count: inBuffer-&gt;mAudioDataByteSize] AUTORELEASEOBJ];<br>
+               soundAtom *atom = AUTORELEASEOBJ([[soundAtom alloc] initWith: inBuffer-&gt;mAudioData count: inBuffer-&gt;mAudioDataByteSize]);<br>
                [myInstance.soundInQueue addItem: atom];<br>
     }<br>
<br>
@@ -281,7 +283,7 @@<br>
        OSStatus result  = AudioQueueDispose (self.outputAudioQueue,true);<br>
 #pragma unused(result)<br>
        self.outputAudioQueue = nil;<br>
-       self.soundOutQueue = [[[Queue alloc] init] AUTORELEASEOBJ];<br>
+       self.soundOutQueue = AUTORELEASEOBJ([[Queue alloc] init]);<br>
        return 1;<br>
 }<br>
<br>
@@ -308,7 +310,7 @@<br>
                return interpreterProxy-&gt;primitiveFail();<br>
        //NSLog(@&quot;%i sound place samples on queue frames %i startIndex %i count %i&quot;,ioMSecs(),frameCount,startIndex,byteCount-startIndex);<br>
<br>
-       soundAtom *atom = [[[soundAtom alloc] initWith: arrayIndex+startIndex count: (unsigned) (byteCount-startIndex)] AUTORELEASEOBJ];<br>
+       soundAtom *atom = AUTORELEASEOBJ([[soundAtom alloc] initWith: arrayIndex+startIndex count: (unsigned) (byteCount-startIndex)]);<br>
        [self.soundOutQueue addItem: atom];<br>
<br>
        if (!self.outputIsRunning) {<br>
@@ -396,7 +398,7 @@<br>
                return 0;<br>
        result = AudioQueueDispose (self.inputAudioQueue,true);<br>
        self.inputAudioQueue = nil;<br>
-       self.soundInQueue = [[[Queue alloc] init] AUTORELEASEOBJ];<br>
+       self.soundInQueue = AUTORELEASEOBJ([[Queue alloc] init]);<br>
        return 1;<br>
 }<br>
<br>
@@ -424,6 +426,7 @@<br>
                atom = [self.soundInQueue returnAndRemoveOldest];<br>
                memcpy(arrayIndex+start,atom.data,atom.byteCount);<br>
                count= MIN(atom.byteCount, bufferSizeInBytes - start);<br>
+        RELEASEOBJ(atom);<br>
                return count / (SqueakFrameSize / 2) / self.inputChannels;<br>
        } else {<br>
                count= MIN(atom.byteCount-atom.startOffset, bufferSizeInBytes - start);<br>
@@ -431,6 +434,7 @@<br>
                atom.startOffset = atom.startOffset + (count);<br>
                if (atom.startOffset == atom.byteCount) {<br>
                        atom = [self.soundInQueue returnAndRemoveOldest]; //ignore now it&#39;s empty<br>
+            RELEASEOBJ(atom);<br>
                }<br>
                return count / (SqueakFrameSize / 2) / self.inputChannels;<br>
        }<br>
<br>
Modified: branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -92,11 +92,11 @@<br>
                return;<br>
        }<br>
<br>
-       if([lockForSqueak lockWhenCondition: 0 beforeDate: (timeout = [[[NSDate alloc] initWithTimeIntervalSinceNow: 3.0] AUTORELEASEOBJ])])<br>
+       if([lockForSqueak lockWhenCondition: 0 beforeDate: (timeout = AUTORELEASEOBJ([[NSDate alloc] initWithTimeIntervalSinceNow: 3.0]))])<br>
        {<br>
                // NSLog(@&quot;inside lock 0&quot;);<br>
                [lockForSqueak unlockWithCondition: 1];<br>
-               invocation = [anInvocation RETAINOBJ];<br>
+               invocation = RETAINOBJ(anInvocation);<br>
<br>
                // NSLog(@&quot;signalling squeak&quot;);<br>
                interpreterProxy-&gt;signalSemaphoreWithIndex(sem);<br>
@@ -104,7 +104,7 @@<br>
                if (isCarbonVM)<br>
                        interpreterProxy-&gt;callbackEnter(&amp;callbackid);<br>
<br>
-               if([lockForSqueak lockWhenCondition: 2 beforeDate: (timeout = [[[NSDate alloc] initWithTimeIntervalSinceNow: 5.0] AUTORELEASEOBJ])] )<br>
+               if([lockForSqueak lockWhenCondition: 2 beforeDate: (timeout = AUTORELEASEOBJ([[NSDate alloc] initWithTimeIntervalSinceNow: 5.0]))] )<br>
                {<br>
                        // NSLog(@&quot;inside lock 2&quot;);<br>
                        invocation = nil;<br>
@@ -189,9 +189,9 @@<br>
<br>
 - (void) dealloc<br>
 {<br>
-    [lockForSqueak RELEASEOBJ];<br>
-    [sigs RELEASEOBJ];<br>
-    [target RELEASEOBJ];<br>
+    RELEASEOBJ(lockForSqueak);<br>
+    RELEASEOBJ(sigs);<br>
+    RELEASEOBJ(target);<br>
     SUPERDEALLOC<br>
 }<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/Queue.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/Queue.m        2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/Queue.m        2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -73,7 +73,7 @@<br>
<br>
 - (void) dealloc<br>
 {<br>
-    [mItemArray RELEASEOBJ];<br>
+    RELEASEOBJ(mItemArray);<br>
     SUPERDEALLOC<br>
 }<br>
<br>
@@ -86,6 +86,7 @@<br>
        anObject = [mItemArray lastObject];<br>
        if (anObject)<br>
        {<br>
+        RETAINOBJ(anObject);<br>
                [mItemArray removeLastObject];<br>
        }<br>
                }<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m  2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m  2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -45,7 +45,7 @@<br>
 @synthesize squeakApplication,squeakThread;<br>
<br>
 - (void)dealloc {<br>
-    [squeakApplication RELEASEOBJ];<br>
+    RELEASEOBJ(squeakApplication);<br>
     SUPERDEALLOC<br>
 }<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m     2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m     2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -191,7 +191,7 @@<br>
<br>
 NSString* createFilePathFromString(char * aFilenameString,<br>
                                                                        sqInt filenameLength, sqInt resolveAlias) {<br>
-       NSString * filePath = [[[NSString alloc] initWithBytes: aFilenameString length: (NSUInteger) filenameLength encoding: NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+       NSString * filePath = AUTORELEASEOBJ([[NSString alloc] initWithBytes: aFilenameString length: (NSUInteger) filenameLength encoding: NSUTF8StringEncoding]);<br>
        if (!filePath) {<br>
                return NULL;<br>
        }<br>
@@ -203,7 +203,7 @@<br>
                NSString *newFilePath = [gDelegateApp.squeakApplication.fileDirectoryLogic resolvedAliasFiles: owningDirectoryPath];<br>
                filePath = [newFilePath stringByAppendingPathComponent: [filePath lastPathComponent]];<br>
        }<br>
-    [filePath RETAINOBJ];<br>
+<br>
        return filePath;<br>
 }<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m       2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m       2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -133,8 +133,8 @@<br>
     if (nameStringLength &lt;= 0 || pathStringLength &lt;= 0)<br>
         return BAD_PATH;<br>
<br>
-       directoryPath = [[[NSString alloc] initWithBytes: pathString length: (NSUInteger) pathStringLength encoding: NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
-    fileName      = [[[NSString alloc] initWithBytes: nameString length: (NSUInteger) nameStringLength encoding: NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+       directoryPath = AUTORELEASEOBJ([[NSString alloc] initWithBytes: pathString length: (NSUInteger) pathStringLength encoding: NSUTF8StringEncoding]);<br>
+    fileName      = AUTORELEASEOBJ([[NSString alloc] initWithBytes: nameString length: (NSUInteger) nameStringLength encoding: NSUTF8StringEncoding]);<br>
<br>
     if (![directoryPath hasSuffix: @&quot;/&quot;]) {<br>
         directoryPath = [directoryPath stringByAppendingString: @&quot;/&quot;];<br>
@@ -190,7 +190,7 @@<br>
        }<br>
<br>
        if (pathStringLength &gt; 0) {<br>
-               directoryPath = [[[NSString alloc] initWithBytes: pathString length: (NSUInteger) pathStringLength encoding: NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+               directoryPath = AUTORELEASEOBJ([[NSString alloc] initWithBytes: pathString length: (NSUInteger) pathStringLength encoding: NSUTF8StringEncoding]);<br>
     }<br>
        if (directoryPath == NULL) {<br>
                return BAD_PATH;<br>
@@ -376,9 +376,9 @@<br>
 }<br>
<br>
 - (void)dealloc {<br>
+    RELEASEOBJ(lastPathForDirLookup);<br>
+    RELEASEOBJ(directoryContentsForDirLookup);<br>
     SUPERDEALLOC<br>
-    [lastPathForDirLookup RELEASEOBJ];<br>
-    [directoryContentsForDirLookup RELEASEOBJ];<br>
 }<br>
<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -56,7 +56,7 @@<br>
 }<br>
<br>
 - (void)dealloc {<br>
-    [defaults RELEASEOBJ];<br>
+    RELEASEOBJ(defaults);<br>
     SUPERDEALLOC<br>
 }<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m       2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m       2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -76,6 +76,7 @@<br>
                @autoreleasepool {<br>
             [self processAsOldEventOrComplexEvent: event placeIn: evt];<br>
         }<br>
+        RELEASEOBJ(event);<br>
        }<br>
<br>
 }<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m      2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m      2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -209,11 +209,13 @@<br>
<br>
 }<br>
<br>
+#ifndef SPURVM<br>
 #if COGVM<br>
     void sqMacMemoryFree();<br>
 #else<br>
     void sqMacMemoryFree(void);<br>
 #endif<br>
+#endif<br>
<br>
 - (void) ioExit {<br>
        [self ioExitWithErrorCode: 0];<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.m  2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.m  2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -64,7 +64,7 @@<br>
        copyImage1To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);<br>
<br>
<br>
-       CHECKANDRETURN([[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
+       CHECKANDRETURN(AUTORELEASEOBJ([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
                                                                                                                   pixelsWide:right-left<br>
                                                                                                                   pixelsHigh:bottom-top<br>
                                                                                                                bitsPerSample:bitsPerSample<br>
@@ -73,7 +73,7 @@<br>
                                                                                                                         isPlanar:NO<br>
                                                                                                           colorSpaceName:colorSpace<br>
                                                                                                                  bytesPerRow:bytesPerRow<br>
-                                                                                                                bitsPerPixel:bitsPerPixel] AUTORELEASEOBJ]);<br>
+                                                                                                                bitsPerPixel:bitsPerPixel]));<br>
 }//extractPixels_1_to_32;<br>
<br>
<br>
@@ -96,7 +96,7 @@<br>
        copyImage2To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);<br>
<br>
<br>
-       CHECKANDRETURN([[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
+       CHECKANDRETURN(AUTORELEASEOBJ([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
                                                                                                                   pixelsWide:right-left<br>
                                                                                                                   pixelsHigh:bottom-top<br>
                                                                                                                bitsPerSample:bitsPerSample<br>
@@ -105,7 +105,7 @@<br>
                                                                                                                         isPlanar:NO<br>
                                                                                                           colorSpaceName:colorSpace<br>
                                                                                                                  bytesPerRow:bytesPerRow<br>
-                                                                                                                bitsPerPixel:bitsPerPixel] AUTORELEASEOBJ]);<br>
+                                                                                                                bitsPerPixel:bitsPerPixel]));<br>
 }//extractPixels_2_to_32;<br>
<br>
 -(CGImageRef)extractPixels_4_to_32:(void*)srcBits<br>
@@ -127,7 +127,7 @@<br>
        copyImage4To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);<br>
<br>
<br>
-       CHECKANDRETURN([[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
+       CHECKANDRETURN(AUTORELEASEOBJ([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
                                                                                                                   pixelsWide:right-left<br>
                                                                                                                   pixelsHigh:bottom-top<br>
                                                                                                                bitsPerSample:bitsPerSample<br>
@@ -136,7 +136,7 @@<br>
                                                                                                                         isPlanar:NO<br>
                                                                                                           colorSpaceName:colorSpace<br>
                                                                                                                  bytesPerRow:bytesPerRow<br>
-                                                                                                                bitsPerPixel:bitsPerPixel] AUTORELEASEOBJ]);<br>
+                                                                                                                bitsPerPixel:bitsPerPixel]));<br>
 }//extractPixels_4_to_32;<br>
<br>
<br>
@@ -159,7 +159,7 @@<br>
                copyImage8To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom,colorMap);<br>
<br>
<br>
-               CHECKANDRETURN([[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
+               CHECKANDRETURN(AUTORELEASEOBJ([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
                                pixelsWide:right-left<br>
                                pixelsHigh:bottom-top<br>
                                bitsPerSample:bitsPerSample<br>
@@ -168,7 +168,7 @@<br>
                                isPlanar:NO<br>
                                colorSpaceName:colorSpace<br>
                                bytesPerRow:bytesPerRow<br>
-                               bitsPerPixel:bitsPerPixel] AUTORELEASEOBJ]);<br>
+                               bitsPerPixel:bitsPerPixel]));<br>
        }//extractPixels_8_to_32;<br>
<br>
<br>
@@ -189,7 +189,7 @@<br>
<br>
        copyImage16To32(srcBits, dBits, srcPixelWidth, height, left, top, right, bottom);<br>
<br>
-       CHECKANDRETURN([[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
+       CHECKANDRETURN(AUTORELEASEOBJ([[NSBitmapImageRep alloc] initWithBitmapDataPlanes:(unsigned char **)&amp;dBits<br>
                                                                                                                   pixelsWide:right-left<br>
                                                                                                                   pixelsHigh:bottom-top<br>
                                                                                                                bitsPerSample:bitsPerSample<br>
@@ -198,7 +198,7 @@<br>
                                                                                                                         isPlanar:NO<br>
                                                                                                           colorSpaceName:colorSpace<br>
                                                                                                                  bytesPerRow:bytesPerRow<br>
-                                                                                                                bitsPerPixel:bitsPerPixel] AUTORELEASEOBJ]);<br>
+                                                                                                                bitsPerPixel:bitsPerPixel]));<br>
 }//extractPixels_16_to_32;<br>
<br>
 -(CGImageRef)computeBitmapFromBitsIndex:(void*)srcBits<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m    2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m    2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -43,8 +43,8 @@<br>
 #import &quot;sqSqueakOSXInfoPlistInterface.h&quot;<br>
 #if defined(i386) || defined(__i386) || defined(__i386__)<br>
 #else<br>
-#import &lt;Fabric/Fabric.h&gt;<br>
-#import &lt;Crashlytics/Crashlytics.h&gt;<br>
+//#import &lt;Fabric/Fabric.h&gt;<br>
+//#import &lt;Crashlytics/Crashlytics.h&gt;<br>
 #endif<br>
<br>
 #ifndef USE_CORE_GRAPHICS<br>
@@ -63,7 +63,7 @@<br>
 @synthesize window,mainView,possibleImageNameAtLaunchTime,checkForFileNameOnFirstParm,windowHandler;<br>
<br>
 - (sqSqueakMainApplication *) makeApplicationInstance {<br>
-       return [[[sqSqueakOSXApplication alloc] init] AUTORELEASEOBJ];<br>
+       return AUTORELEASEOBJ([[sqSqueakOSXApplication alloc] init]);<br>
 }<br>
<br>
 - (void)applicationWillFinishLaunching:(NSNotification *)aNotification {<br>
@@ -75,13 +75,13 @@<br>
 #if defined(i386) || defined(__i386) || defined(__i386__)<br>
 #else<br>
     //   [Crashlytics startWithAPIKey:@&quot;add501476623fc20212a60334cd537d16dfd566f&quot;];<br>
-    [Fabric with:@[[Crashlytics class]]];<br>
+    //[Fabric with:@[[Crashlytics class]]];<br>
 #endif<br>
<br>
     @autoreleasepool {<br>
                gDelegateApp = self;<br>
                self.squeakApplication = [self makeApplicationInstance];<br>
-               self.windowHandler = [[[sqSqueakOSXScreenAndWindow alloc] init] AUTORELEASEOBJ];<br>
+               self.windowHandler = AUTORELEASEOBJ([[sqSqueakOSXScreenAndWindow alloc] init]);<br>
                windowHandler.mainViewOnWindow = self.mainView;<br>
                self.mainView.windowLogic = windowHandler;<br>
                windowHandler.windowIndex = 1;<br>
@@ -176,7 +176,7 @@<br>
     //It can right now, I have two implementations to pick (CoreGraphics or OpenGL), muy more/different could be added<br>
     //in the future.<br>
<br>
-    NSView *view = [[[ContentViewClass alloc] initWithFrame:[[self window] frame]] AUTORELEASEOBJ];<br>
+    NSView *view = AUTORELEASEOBJ([[ContentViewClass alloc] initWithFrame:[[self window] frame]]);<br>
     self.mainView = (id) view;<br>
     [[self window] setContentView: view];<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m        2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m        2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -101,7 +101,7 @@<br>
 }<br>
<br>
 sqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle) {<br>
-    NSString *title = [[[NSString alloc] initWithBytes:newTitle length:sizeOfTitle encoding:NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+    NSString *title = AUTORELEASEOBJ([[NSString alloc] initWithBytes:newTitle length:sizeOfTitle encoding:NSUTF8StringEncoding]);<br>
     [[[NSApplication sharedApplication] mainWindow] setTitle:title];<br>
        return 1;<br>
 }<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m  2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m  2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -208,7 +208,7 @@<br>
                        OSErr err = FSFindFolder(kSystemDomain, kFrameworksFolderType, false, &amp;frameworksFolderRef);<br>
 #pragma unused(err)<br>
                        NSURL *myURLRef = (NSURL *) CFBridgingRelease(CFURLCreateFromFSRef(kCFAllocatorDefault, &amp;frameworksFolderRef));<br>
-                       systemFolder = [[myURLRef path] RETAINOBJ];<br>
+                       systemFolder = RETAINOBJ([myURLRef path]);<br>
                }<br>
<br>
                pluginNameLength = strlen(pluginName);<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m        2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m        2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -74,7 +74,7 @@<br>
<br>
 - (void) clipboardWrite: (sqInt) count from: (char *)byteArrayIndex  startingAt:  (sqInt) startIndex {<br>
        NSPasteboard      *pboard= [NSPasteboard generalPasteboard];<br>
-       NSString * string = [[[NSString alloc] initWithBytes: byteArrayIndex length:(NSUInteger)count encoding: NSUTF8StringEncoding] AUTORELEASEOBJ];<br>
+       NSString * string = AUTORELEASEOBJ([[NSString alloc] initWithBytes: byteArrayIndex length:(NSUInteger)count encoding: NSUTF8StringEncoding]);<br>
        [pboard declareTypes: @[NSStringPboardType] owner: nil];<br>
        [pboard setString: string forType: NSStringPboardType];<br>
 }<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -62,13 +62,13 @@<br>
                return;<br>
        @autoreleasepool {<br>
<br>
-       NSBitmapImageRep *bitmap= [[[NSBitmapImageRep alloc]<br>
+       NSBitmapImageRep *bitmap= AUTORELEASEOBJ([[NSBitmapImageRep alloc]<br>
                         initWithBitmapDataPlanes:  NULL pixelsWide: 16 pixelsHigh: 16<br>
                         bitsPerSample: 1 samplesPerPixel: 2<br>
                         hasAlpha: YES isPlanar: YES<br>
                         colorSpaceName: NSCalibratedBlackColorSpace<br>
                         bytesPerRow: 2<br>
-                        bitsPerPixel: 0] AUTORELEASEOBJ];<br>
+                        bitsPerPixel: 0]);<br>
<br>
     unsigned char*      planes[5];<br>
        [bitmap getBitmapDataPlanes:planes];<br>
@@ -93,7 +93,7 @@<br>
                mask[i*2 + 1]= (word &gt;&gt; 16) &amp; 0xFF;<br>
        }<br>
<br>
-       NSImage *image = [[[NSImage alloc] init] AUTORELEASEOBJ];<br>
+       NSImage *image = AUTORELEASEOBJ([[NSImage alloc] init]);<br>
        [image addRepresentation: bitmap];<br>
<br>
<br>
@@ -125,13 +125,13 @@<br>
<br>
        @autoreleasepool {<br>
<br>
-       NSBitmapImageRep *bitmap= [[[NSBitmapImageRep alloc]<br>
+       NSBitmapImageRep *bitmap= AUTORELEASEOBJ([[NSBitmapImageRep alloc]<br>
                                                                initWithBitmapDataPlanes: NULL pixelsWide: extentX pixelsHigh: extentY<br>
                                                                bitsPerSample: 8 samplesPerPixel: 4<br>
                                                                hasAlpha: YES isPlanar: NO<br>
                                                                colorSpaceName: NSCalibratedRGBColorSpace<br>
                                                                bytesPerRow: extentX * 4<br>
-                                                               bitsPerPixel: 0] AUTORELEASEOBJ];<br>
+                                                               bitsPerPixel: 0]);<br>
        unsigned int *planes[5];<br>
        [bitmap getBitmapDataPlanes: (unsigned char **) planes];<br>
        unsigned int *src= (unsigned int*) pointerForOop(cursorBitsIndex);<br>
@@ -144,7 +144,7 @@<br>
                *dst= (*src &amp; 0xFF00FF00) | ((*src &amp; 0x000000FF) &lt;&lt; 16) | ((*src &amp; 0x00FF0000) &gt;&gt; 16); // BGRA to RGBA<br>
 #endif<br>
        }<br>
-       NSImage  *image= [[[NSImage alloc] init] AUTORELEASEOBJ];<br>
+       NSImage  *image= AUTORELEASEOBJ([[NSImage alloc] init]);<br>
        [image addRepresentation: bitmap];<br>
        NSPoint hotSpot= { -offsetX, -offsetY };<br>
        self.squeakHasCursor = YES;<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -156,10 +156,7 @@<br>
 }<br>
<br>
 - (void) pushEventToQueue: (sqInputEvent *) evt {<br>
-    NSMutableArray* data = [NSMutableArray arrayWithCapacity: 2];<br>
-       [data addObject: @1];<br>
-       [data addObject: [NSData  dataWithBytes:(const void *) evt length: sizeof(sqInputEvent)]];<br>
-       [eventQueue addItem: data];<br>
+       [eventQueue addItem: @[@1,[NSData  dataWithBytes:(const void *) evt length: sizeof(sqInputEvent)]]];<br>
 }<br>
<br>
 - (void) recordCharEvent:(NSString *) unicodeString fromView: (sqSqueakOSXOpenGLView *) mainView {<br>
@@ -195,7 +192,7 @@<br>
             }<br>
                }<br>
<br>
-               NSString *lookupString = [[[NSString alloc] initWithCharacters: &amp;unicode length: 1] AUTORELEASEOBJ];<br>
+               NSString *lookupString = AUTORELEASEOBJ([[NSString alloc] initWithCharacters: &amp;unicode length: 1]);<br>
                [lookupString getBytes: &amp;macRomanCharacter maxLength: 1 usedLength: NULL encoding: NSMacOSRomanStringEncoding<br>
                                           options: 0 range: picker remainingRange: NULL];<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m  2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m  2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -126,7 +126,7 @@<br>
 }<br>
<br>
 - (void) setupSoundLogic {<br>
-       self.soundInterfaceLogic = [[[sqSqueakOSXSoundCoreAudio alloc] init] AUTORELEASEOBJ];<br>
+       self.soundInterfaceLogic = AUTORELEASEOBJ([[sqSqueakOSXSoundCoreAudio alloc] init]);<br>
        [(sqSqueakOSXSoundCoreAudio *) self.soundInterfaceLogic soundInitOverride];<br>
<br>
        snd_Start(2644, 22050, 1, 0);<br>
@@ -195,7 +195,7 @@<br>
<br>
        if ([args count] &lt; 2)<br>
                return;<br>
-       NSMutableArray *revisedArgs = [[args mutableCopyWithZone: NULL] AUTORELEASEOBJ];<br>
+       NSMutableArray *revisedArgs = AUTORELEASEOBJ([args mutableCopyWithZone: NULL]);<br>
        [revisedArgs removeObjectAtIndex:0];<br>
<br>
        NSUInteger i,result;<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m       2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m       2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -73,7 +73,7 @@<br>
                NSOpenGLPFABackingStore,<br>
                0<br>
     };<br>
-    return[[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs] AUTORELEASEOBJ];<br>
+    return AUTORELEASEOBJ([[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]);<br>
 }<br>
<br>
 - (id)initWithFrame:(NSRect)frameRect {<br>
@@ -335,11 +335,11 @@<br>
        //<a href="http://www.internet4classrooms.com/mac_ext.gif" rel="noreferrer" target="_blank">http://www.internet4classrooms.com/mac_ext.gif</a><br>
        //<a href="http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-571.html" rel="noreferrer" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-571.html</a><br>
<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
<br>
-       NSArray *down = [[[NSArray alloc] initWithObjects: theEvent,nil] AUTORELEASEOBJ];<br>
+    NSArray *down = @[theEvent];<br>
        @synchronized(self) {<br>
                lastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;<br>
<br>
@@ -355,11 +355,11 @@<br>
 }<br>
<br>
 -(void)keyDown:(NSEvent*)theEvent {<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
<br>
-       NSArray *down = [[[NSArray alloc] initWithObjects: theEvent,nil] AUTORELEASEOBJ];<br>
+       NSArray *down = @[theEvent];<br>
 //     NSLog(@&quot;sqSqueakOSXCGView.m&gt;&gt;keyDown:&quot;);<br>
        @synchronized(self) {<br>
                lastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;<br>
@@ -389,7 +389,7 @@<br>
<br>
 - (void)flagsChanged:(NSEvent *)theEvent {<br>
 //     NSLog(@&quot;sqSqueakOSXCGView.m&gt;&gt;flagsChanged -- %d, %d&quot;, [theEvent keyCode], [theEvent modifierFlags] );<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
        self.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails;<br>
@@ -464,7 +464,7 @@<br>
     else return;<br>
<br>
        @synchronized(self) {<br>
-               keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+               keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
                aKeyBoardStrokeDetails.keyCode = keyCode;<br>
                aKeyBoardStrokeDetails.modifierFlags = self.lastSeenKeyBoardModifierDetails.modifierFlags;<br>
                lastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m       2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m       2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -74,7 +74,7 @@<br>
 - (NSString *)resolvedAliasFiles:(NSString *)filePath {<br>
        NSArray *compoents = [[filePath stringByStandardizingPath] pathComponents];<br>
        NSString *thisComponent;<br>
-       NSString *path = [[[NSString alloc] init] AUTORELEASEOBJ];<br>
+       NSString *path = AUTORELEASEOBJ([[NSString alloc] init]);<br>
        for (thisComponent in compoents) {<br>
                path = [path stringByAppendingPathComponent:thisComponent];<br>
                if (![[NSFileManager defaultManager] fileExistsAtPath:path])<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m   2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m   2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -70,7 +70,7 @@<br>
                NSOpenGLPFABackingStore,<br>
                0<br>
     };<br>
-    return[[[NSOpenGLPixelFormat alloc] initWithAttributes:attrs] AUTORELEASEOBJ];<br>
+    return AUTORELEASEOBJ([[NSOpenGLPixelFormat alloc] initWithAttributes:attrs]);<br>
 }<br>
<br>
 - (id)initWithFrame:(NSRect)frameRect {<br>
@@ -415,7 +415,7 @@<br>
        //<a href="http://www.internet4classrooms.com/mac_ext.gif" rel="noreferrer" target="_blank">http://www.internet4classrooms.com/mac_ext.gif</a><br>
        //<a href="http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-571.html" rel="noreferrer" target="_blank">http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-571.html</a><br>
<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
<br>
@@ -433,7 +433,7 @@<br>
 }<br>
<br>
 -(void)keyDown:(NSEvent*)theEvent {<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
<br>
@@ -462,7 +462,7 @@<br>
 }<br>
<br>
 - (void)flagsChanged:(NSEvent *)theEvent {<br>
-       keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+       keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
        aKeyBoardStrokeDetails.keyCode = [theEvent keyCode];<br>
        aKeyBoardStrokeDetails.modifierFlags = [theEvent modifierFlags];<br>
        self.lastSeenKeyBoardModifierDetails = aKeyBoardStrokeDetails;<br>
@@ -549,7 +549,7 @@<br>
                                                                                                                                                                                                                                                                                                                                        return;<br>
<br>
        @synchronized(self) {<br>
-               keyBoardStrokeDetails *aKeyBoardStrokeDetails = [[[keyBoardStrokeDetails alloc] init] AUTORELEASEOBJ];<br>
+               keyBoardStrokeDetails *aKeyBoardStrokeDetails = AUTORELEASEOBJ([[keyBoardStrokeDetails alloc] init]);<br>
                aKeyBoardStrokeDetails.keyCode = keyCode;<br>
                aKeyBoardStrokeDetails.modifierFlags = self.lastSeenKeyBoardModifierDetails.modifierFlags;<br>
                lastSeenKeyBoardStrokeDetails = aKeyBoardStrokeDetails;<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m      2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m      2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -53,7 +53,7 @@<br>
 }<br>
<br>
 - (void) dealloc {<br>
-    [mainViewOnWindow RELEASEOBJ];<br>
+    RELEASEOBJ(mainViewOnWindow);<br>
     SUPERDEALLOC<br>
 }<br>
<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/SqueakPureObjc_Prefix.pch<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/SqueakPureObjc_Prefix.pch     2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/SqueakPureObjc_Prefix.pch     2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -7,12 +7,13 @@<br>
 #endif<br>
<br>
 #if __has_feature(objc_arc)<br>
-#define RELEASEOBJ<br>
-#define RETAINOBJ<br>
-#define AUTORELEASEOBJ<br>
+#define RELEASEOBJ(x)<br>
+#define RETAINOBJ(x) x<br>
+#define AUTORELEASEOBJ(x) x<br>
+#define SUPERDEALLOC<br>
 #else<br>
-#define RELEASEOBJ release<br>
-#define RETAINOBJ retain<br>
-#define AUTORELEASEOBJ autorelease<br>
+#define RELEASEOBJ(x) [x release]<br>
+#define RETAINOBJ(x) [x retain]<br>
+#define AUTORELEASEOBJ(x) [x autorelease]<br>
 #define SUPERDEALLOC [super dealloc];<br>
-#endif<br>
\ No newline at end of file<br>
+#endif<br>
<br>
Modified: branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.c<br>
===================================================================<br>
--- branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.c        2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.c        2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -167,6 +167,7 @@<br>
        return gMaxHeapSize - gHeapSize;<br>
 }<br>
<br>
+#ifndef SPURVM<br>
 void<br>
 sqMacMemoryFree() {<br>
        if (gSqueakUseFileMappedMMAP) {<br>
@@ -174,6 +175,7 @@<br>
                munmap(startOfmmapForANONMemory,freeSpaceRoundedUpToPageSize);<br>
        }<br>
 }<br>
+#endif<br>
<br>
 #ifdef BUILD_FOR_OSX<br>
 size_t<br>
@@ -249,4 +251,36 @@<br>
        if (munmap(addr, sz) != 0)<br>
                perror(&quot;sqDeallocateMemorySegment... munmap&quot;);<br>
 }<br>
+<br>
+static int mmax(size_t x, size_t y) { return (x &gt; y) ? x : y; }<br>
+<br>
+<br>
+/* Answer the address of minHeapSize rounded up to page size bytes of memory. */<br>
+usqInt<br>
+sqAllocateMemory(usqInt minHeapSize, usqInt desiredHeapSize)<br>
+{<br>
+    char *hint, *address, *alloc;<br>
+    unsigned long alignment, allocBytes;<br>
+<br>
+    if (pageSize) {<br>
+        fprintf(stderr, &quot;sqAllocateMemory: already called\n&quot;);<br>
+        exit(1);<br>
+    }<br>
+    pageSize = getpagesize();<br>
+    pageMask = ~(pageSize - 1);<br>
+<br>
+    hint = sbrk(0);<br>
+<br>
+    alignment = mmax(pageSize,1024*1024);<br>
+    address = (char *)(((usqInt)hint + alignment - 1) &amp; ~(alignment - 1));<br>
+<br>
+    alloc = sqAllocateMemorySegmentOfSizeAboveAllocatedSizeInto<br>
+    (roundUpToPage(desiredHeapSize), address, &amp;allocBytes);<br>
+    if (!alloc) {<br>
+        fprintf(stderr, &quot;sqAllocateMemory: initial alloc failed!\n&quot;);<br>
+        exit(errno);<br>
+    }<br>
+    return (usqInt)alloc;<br>
+}<br>
+<br>
 #endif /* SPURVM */<br>
<br>
Modified: branches/Cog/platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c<br>
===================================================================<br>
--- branches/Cog/platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c     2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/unix/plugins/AsynchFilePlugin/sqUnixAsynchFile.c     2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -140,7 +140,7 @@<br>
   return fp;<br>
 }<br>
<br>
-INLINE static allocateBuffer(struct FileBuf *buf, int size)<br>
+INLINE static int allocateBuffer(struct FileBuf *buf, int size)<br>
 {<br>
   if (buf-&gt;capacity &gt;= size)<br>
     return 1;<br>
<br>
Modified: branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c<br>
===================================================================<br>
--- branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c    2015-10-26 04:05:32 UTC (rev 3480)<br>
+++ branches/Cog/platforms/unix/vm/sqUnixHeartbeat.c    2015-11-02 00:02:54 UTC (rev 3481)<br>
@@ -463,9 +463,9 @@<br>
 unsigned long<br>
 ioHeartbeatFrequency(int resetStats)<br>
 {<br>
-       unsigned duration = (ioUTCMicroseconds() - get64(frequencyMeasureStart))<br>
+       unsigned long duration = (ioUTCMicroseconds() - get64(frequencyMeasureStart))<br>
                                                / MicrosecondsPerSecond;<br>
-       unsigned frequency = duration ? heartbeats / duration : 0;<br>
+       unsigned long frequency = duration ? heartbeats / duration : 0;<br>
<br>
        if (resetStats) {<br>
                unsigned long long zero = 0;<br>
<br>
</blockquote></div><br></div></div>