]> git.saurik.com Git - veency.git/commitdiff
Don't leak the NSThread. v0.9.3193
authorJay Freeman (saurik) <saurik@saurik.com>
Wed, 26 May 2010 22:25:51 +0000 (22:25 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Wed, 26 May 2010 22:25:51 +0000 (22:25 +0000)
Tweak.mm
control

index d732666fe1dee75f50dfc2b302e8cd692ffdb0d0..0834b08753b172d81358376c895f83bff62b2543 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -175,8 +175,9 @@ static void VNCEnabled();
     [[$SBStatusBarController sharedStatusBarController] addStatusBarItem:@"Veency"];
 }
 
-+ (void) performSetup {
++ (void) performSetup:(NSThread *)thread {
     NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]);
+    [thread autorelease];
     VNCSetup();
     VNCEnabled();
     [pool release];
@@ -593,11 +594,13 @@ MSHook(kern_return_t, IOMobileFramebufferSwapSetLayer,
         width_ = size.width;
         height_ = size.height;
 
-        NSThread *thread([[[NSThread alloc]
+        NSThread *thread([NSThread alloc]);
+
+        [thread
             initWithTarget:[VNCBridge class]
-            selector:@selector(performSetup)
-            object:nil
-        ] autorelease]);
+            selector:@selector(performSetup:)
+            object:thread
+        ];
 
         [thread start];
     } else if (_unlikely(clients_ != 0)) {
diff --git a/control b/control
index 5f72a8b95484b3a8221e14b0393d2b4c094690b2..b4343b6070fc86fb779f23e146d655b692f888a8 100644 (file)
--- a/control
+++ b/control
@@ -5,7 +5,7 @@ Priority: optional
 Section: Networking
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 0.9.3192-1
+Version: 0.9.3193-1
 Description: a VNC /server/ for the iPhone
 Name: Veency
 Depends: mobilesubstrate (>= 0.9.2966-1), libvncserver, com.saurik.iphone.ske, preferenceloader, jp.ashikase.mousesupport | firmware (<< 3.0)