diff options
Diffstat (limited to 'CommonLibs/LinkedLists.cpp')
-rw-r--r-- | CommonLibs/LinkedLists.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/CommonLibs/LinkedLists.cpp b/CommonLibs/LinkedLists.cpp index 35a8541..b73a579 100644 --- a/CommonLibs/LinkedLists.cpp +++ b/CommonLibs/LinkedLists.cpp @@ -29,6 +29,25 @@ #include "LinkedLists.h" +PointerFIFO::~PointerFIFO() +{ + ListNode *node, *next; + + node = mHead; + while (node != NULL) { + next = node->next(); + delete node; + node = next; + } + + node = mFreeList; + while (node != NULL) { + next = node->next(); + delete node; + node = next; + } +} + void PointerFIFO::push_front(void* val) // by pat { // Pat added this routine for completeness, but never used or tested. |