From: Jay Freeman (saurik) Date: Tue, 7 Dec 2010 10:23:24 +0000 (-0800) Subject: Reallocate ChangesController::packages_ in _reloadPackages: instead of clearing in... X-Git-Tag: v1.1.0%b1~395 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/d3aa466c92e3677aca0d4e7adff3bdcba1a00030 Reallocate ChangesController::packages_ in _reloadPackages: instead of clearing in reloadData. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index b7050fc6..ec4ba25d 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7542,6 +7542,9 @@ freeing the view controllers on tab change */ } - (void) _reloadPackages:(NSArray *)packages { + CFRelease(packages_); + packages_ = CFArrayCreateMutable(kCFAllocatorDefault, [packages count], NULL); + _trace(); for (Package *package in packages) if ([package upgradableAndEssential:YES] || [package visible]) @@ -7556,8 +7559,6 @@ freeing the view controllers on tab change */ era_ = [database_ era]; NSArray *packages = [database_ packages]; - CFArrayRemoveAllValues(packages_); - [sections_ removeAllObjects]; #if 1