MCPcopy Create free account
hub / github.com/dillo-browser/dillo / ~HashSet

Method ~HashSet

lout/container.cc:458–481  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456}
457
458HashSet::~HashSet()
459{
460 for (int i = 0; i < tableSize; i++) {
461 Node *n1 = table[i];
462 while (n1) {
463 Node *n2 = n1->next;
464
465 // It seems appropriate to call "clearNode(n1)" here instead
466 // of "delete n1->object", but since this is the destructor,
467 // the implementation of a sub class would not be called
468 // anymore. This is the reason why HashTable has an
469 // destructor.
470 if (ownerOfObjects) {
471 PRINTF ("- deleting object: %s\n", n1->object->toString());
472 delete n1->object;
473 }
474
475 delete n1;
476 n1 = n2;
477 }
478 }
479
480 delete[] table;
481}
482
483int HashSet::size ()
484{

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected