From d3aa466c92e3677aca0d4e7adff3bdcba1a00030 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Tue, 7 Dec 2010 02:23:24 -0800 Subject: 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 b7050fc..ec4ba25 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 -- cgit v1.2.3