]> git.saurik.com Git - cydia.git/commitdiff
Use a much more reasonable capacity for cydia.getInstalledPackages().
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 25 Nov 2010 23:53:19 +0000 (15:53 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 25 Nov 2010 23:53:19 +0000 (15:53 -0800)
MobileCydia.mm

index b849f5ecc187ada7926aa60ebe41d789e2ab9d5a..dae7d615cda96e6b0a1391d907c53b2c5f901a60 100644 (file)
@@ -3678,7 +3678,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
 
 - (NSArray *) getInstalledPackages {
     NSArray *packages([[Database sharedInstance] packages]);
-    NSMutableArray *installed([NSMutableArray arrayWithCapacity:[packages count]]);
+    NSMutableArray *installed([NSMutableArray arrayWithCapacity:1024]);
     for (Package *package in packages)
         if ([package installed] != nil)
             [installed addObject:package];