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-Url: https://git.saurik.com/cydia.git/commitdiff_plain/ba8eb4e588b528c06a2ee0c9501bf72332d746ab?ds=inline 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