ecore_cocoa: remove ObjC autorelease block to avoid segv when window is closed.
authorNicolas Aguirre <aguirre.nicolas@gmail.com>
Thu, 12 Feb 2015 07:07:01 +0000 (08:07 +0100)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 12 Mar 2015 06:43:58 +0000 (07:43 +0100)
autorelease block is used in ObjC to release automatically objects not used
anymore. Placed here this block release the NSWindow we created by hand in the
ecore_cocoa code and give us a SEGV as we use memory already freed
automatically. Removing this block fix this issue.

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/ecore_cocoa/ecore_cocoa_app.m

index 3aeda02..5ee349c 100644 (file)
@@ -3,7 +3,6 @@
 static Eina_Bool
 _ecore_cocoa_run_loop_cb(void *data EINA_UNUSED)
 {
-   @autoreleasepool {
         @try {
              NSEvent *e;
              do {
@@ -30,7 +29,6 @@ _ecore_cocoa_run_loop_cb(void *data EINA_UNUSED)
              [NSApp reportException:except];
              // XXX Maybe use Eina_Log to report the error instead
         }
-   }
 
    return ECORE_CALLBACK_RENEW;
 }