]> git.saurik.com Git - cycript.git/blobdiff - Handler.mm
Fixed a stupid bug, caused by GNUstep porting, that led to infinite loops in CYONific...
[cycript.git] / Handler.mm
index 39825fab9bffd60f5ac9ccd268cf7d61b0809422..016f0c8bc1aeebde97ae18728534800041cc5754 100644 (file)
@@ -89,8 +89,9 @@ struct CYClient :
     }
 
     void Handle() {
-        CYClient_ *client = [[CYClient_ alloc] init];
-        @try {
+        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+        CYClient_ *client = [[[CYClient_ alloc] init] autorelease];
 
         for (;;) {
             size_t size;
@@ -133,9 +134,7 @@ struct CYClient :
                     return;
         }
 
-        } @finally {
-            [client release];
-        }
+        [pool release];
     }
 };