OSDN Git Service

MacOSXにおけるメモリリークの問題を修正
authorhikarupsp <hikarupsp@users.sourceforge.jp>
Tue, 11 Mar 2014 12:59:04 +0000 (21:59 +0900)
committerhikarupsp <hikarupsp@users.sourceforge.jp>
Tue, 11 Mar 2014 12:59:04 +0000 (21:59 +0900)
dpndenv.c
main.c
osecpu.h

index e4dbe4c..e9697af 100644 (file)
--- a/dpndenv.c
+++ b/dpndenv.c
@@ -50,6 +50,9 @@ NSApplication* app;
     CGImageRef image = CGBitmapContextCreateImage(_context);
     CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
     CGContextDrawImage(currentContext, NSRectToCGRect(rect), image);
+    
+    CFRelease(colorSpace);
+    CFRelease(image);
 }
 
 @end
diff --git a/main.c b/main.c
index a65315f..61dbc33 100644 (file)
--- a/main.c
+++ b/main.c
@@ -228,7 +228,6 @@ int HeavyOSECPUMain(int argc, char **argv)
         }
                while (env.winClosed == 0){
                        drv_sleep(100);
-            drv_flshWin(v_xsiz, v_ysiz, 0, 0);
         }
        }
        if (env.lastConsoleChar != '\n'){
index 667080f..6e0d0ab 100644 (file)
--- a/osecpu.h
+++ b/osecpu.h
@@ -97,6 +97,8 @@ struct LabelTable {
        int typ;
 };
 
+typedef struct Device_Window HOSECPU_Device_Window;
+
 typedef struct Regs HOSECPU_RuntimeEnvironment;
 struct Regs {
        int ireg[64];           /* 32bit整数レジスタ */