]> git.saurik.com Git - cydia.git/commitdiff
Use CYPoolStart/End instead of _pool (just starting).
authorJay Freeman (saurik) <saurik@saurik.com>
Sat, 13 Nov 2010 21:25:10 +0000 (13:25 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 15 Nov 2010 22:39:12 +0000 (14:39 -0800)
MobileCydia.mm

index 98a99da1a99ae524fa5cc8f7cd38a7f1d65543be..1be5d2810f397c87e7078517783c931b756119d9 100644 (file)
@@ -197,6 +197,13 @@ void PrintTimes() {
 
 #define _pooled _H<NSAutoreleasePool> _pool([[NSAutoreleasePool alloc] init], true);
 
+#define CYPoolStart() \
+    NSAutoreleasePool *_pool([[NSAutoreleasePool alloc] init]); \
+    do
+#define CYPoolEnd() \
+    while (false); \
+    [_pool release];
+
 static const NSUInteger UIViewAutoresizingFlexibleBoth(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
 
 void NSLogPoint(const char *fix, const CGPoint &point) {
@@ -3260,7 +3267,7 @@ static NSString *Warning_;
     return [self popErrorWithTitle:title] || !success;
 }
 
-- (void) reloadData { _pooled
+- (void) reloadData { CYPoolStart() {
 @synchronized (self) {
     ++era_;
 
@@ -3415,7 +3422,8 @@ static NSString *Warning_;
 
         _trace();
     }
-} }
+}
+} CYPoolEnd() }
 
 - (void) configure {
     NSString *dpkg = [NSString stringWithFormat:@"dpkg --configure -a --status-fd %u", statusfd_];