Reorder field initialization to group fields by task

This commit is contained in:
Benny Baumann 2020-12-01 23:27:04 +01:00 committed by BenBE
parent e3b6049043
commit d0e71cb75f
1 changed files with 11 additions and 9 deletions

View File

@ -20,17 +20,17 @@ in the source distribution for its full text.
ProcessList* ProcessList_init(ProcessList* this, const ObjectClass* klass, UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) { ProcessList* ProcessList_init(ProcessList* this, const ObjectClass* klass, UsersTable* usersTable, Hashtable* pidMatchList, uid_t userId) {
this->processes = Vector_new(klass, true, DEFAULT_SIZE); this->processes = Vector_new(klass, true, DEFAULT_SIZE);
this->processes2 = Vector_new(klass, true, DEFAULT_SIZE); // tree-view auxiliary buffer
this->processTable = Hashtable_new(200, false); this->processTable = Hashtable_new(200, false);
this->usersTable = usersTable;
this->pidMatchList = pidMatchList;
this->userId = userId;
// tree-view auxiliary buffer
this->processes2 = Vector_new(klass, true, DEFAULT_SIZE);
this->displayTreeSet = Hashtable_new(200, false); this->displayTreeSet = Hashtable_new(200, false);
this->draftingTreeSet = Hashtable_new(200, false); this->draftingTreeSet = Hashtable_new(200, false);
this->usersTable = usersTable;
this->pidMatchList = pidMatchList;
this->userId = userId;
// set later by platform-specific code // set later by platform-specific code
this->cpuCount = 0; this->cpuCount = 0;
@ -65,11 +65,13 @@ void ProcessList_done(ProcessList* this) {
hwloc_topology_destroy(this->topology); hwloc_topology_destroy(this->topology);
} }
#endif #endif
Hashtable_delete(this->displayTreeSet);
Hashtable_delete(this->draftingTreeSet); Hashtable_delete(this->draftingTreeSet);
Hashtable_delete(this->displayTreeSet);
Hashtable_delete(this->processTable); Hashtable_delete(this->processTable);
Vector_delete(this->processes);
Vector_delete(this->processes2); Vector_delete(this->processes2);
Vector_delete(this->processes);
} }
void ProcessList_setPanel(ProcessList* this, Panel* panel) { void ProcessList_setPanel(ProcessList* this, Panel* panel) {