Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index 2fc4c41..fdd1163 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -9,4 +9,5 @@ static QDict<Package> *packageListAll; +static int packageListAllRefCount = 0; PackageList::PackageList() @@ -15,4 +16,5 @@ PackageList::PackageList() empty=true; if (!packageListAll) packageListAll = new QDict<Package>(); + packageListAllRefCount++; sections << "All"; subSections.insert("All", new QStringList() ); @@ -32,4 +34,5 @@ PackageList::PackageList( PackageManagerSettings* s) PackageList::~PackageList() { + if (--packageListAllRefCount < 1 ) delete packageListAll; } @@ -52,5 +55,5 @@ void PackageList::insertPackage( Package* pack ) if (!packver) { - packver = new QDict<Package>; + packver = new QDict<Package>(); packver->insert( pack->name(), p ); p->setOtherVersions( packver ); @@ -183,4 +186,5 @@ void PackageList::readFileEntries( QString filename, QString dest ) }; } + delete statusStream; return; } |