From: Jay Freeman (saurik) Date: Sat, 13 Nov 2010 21:25:10 +0000 (-0800) Subject: Use CYPoolStart/End instead of _pool (just starting). X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/7831584c01d982ef8f7249f0feff25392eb8331f Use CYPoolStart/End instead of _pool (just starting). --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 98a99da1..1be5d281 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -197,6 +197,13 @@ void PrintTimes() { #define _pooled _H _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_];