From ba8eb4e588b528c06a2ee0c9501bf72332d746ab Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 7 Dec 2010 02:23:24 -0800 Subject: [PATCH] Reallocate ChangesController::packages_ in _reloadPackages: instead of clearing in reloadData. --- MobileCydia.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 -- 2.45.2