From 0c4fe0f48ff1555422b6d2a17d625e15bc5493e8 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 16 Apr 2011 03:48:38 -0700 Subject: [PATCH] You must autorelease mutableCopy. --- MobileCydia.mm | 10 +++++----- SDURLCache | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index f11037ff..a6b61fed 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4453,7 +4453,7 @@ static _H Diversions_; } - (NSString *) substitutePackageNames:(NSString *)message { - NSMutableArray *words([[message componentsSeparatedByString:@" "] mutableCopy]); + NSMutableArray *words([[[message componentsSeparatedByString:@" "] mutableCopy] autorelease]); for (size_t i(0), e([words count]); i != e; ++i) { NSString *word([words objectAtIndex:i]); if (Package *package = [[Database sharedInstance] packageWithName:word]) @@ -4629,7 +4629,7 @@ static _H Diversions_; } + (NSURLRequest *) requestWithHeaders:(NSURLRequest *)request { - NSMutableURLRequest *copy([request mutableCopy]); + NSMutableURLRequest *copy([[request mutableCopy] autorelease]); NSURL *url([copy URL]); NSString *href([url absoluteString]); @@ -6896,7 +6896,7 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi } return; } - NSMutableArray *controllers = [[self viewControllers] mutableCopy]; + NSMutableArray *controllers = [[[self viewControllers] mutableCopy] autorelease]; if (transient != nil) { UINavigationController *navigation([[[UINavigationController alloc] init] autorelease]); [navigation setViewControllers:[NSArray arrayWithObject:transient]]; @@ -10238,7 +10238,7 @@ _trace(); [self disemulate]; int savedIndex = [[Metadata_ objectForKey:@"InterfaceIndex"] intValue]; - NSArray *saved = [[Metadata_ objectForKey:@"InterfaceState"] mutableCopy]; + NSArray *saved = [[[Metadata_ objectForKey:@"InterfaceState"] mutableCopy] autorelease]; int standardIndex = 0; NSArray *standard = [self defaultStartPages]; @@ -10391,7 +10391,7 @@ MSHook(void *, CFXPreferencesPropertyListSource$createPlistFromDisk, CFXPreferen Class $NSURLConnection; MSHook(id, NSURLConnection$init$, NSURLConnection *self, SEL _cmd, NSURLRequest *request, id delegate, BOOL usesCache, int64_t maxContentLength, BOOL startImmediately, NSDictionary *connectionProperties) { - NSMutableURLRequest *copy([request mutableCopy]); + NSMutableURLRequest *copy([[request mutableCopy] autorelease]); NSURL *url([copy URL]); diff --git a/SDURLCache b/SDURLCache index fc6417ef..0544cf53 160000 --- a/SDURLCache +++ b/SDURLCache @@ -1 +1 @@ -Subproject commit fc6417ef3ce6cc1749e5313168f512290788dffe +Subproject commit 0544cf53dd9cfdb33d55df13668869b341d32535 -- 2.45.2