diff options
Diffstat (limited to 'src/context/cdlist.h')
-rw-r--r-- | src/context/cdlist.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/context/cdlist.h b/src/context/cdlist.h index e3c7e155c..492dc7939 100644 --- a/src/context/cdlist.h +++ b/src/context/cdlist.h @@ -138,9 +138,15 @@ public: * Destructor: delete the list */ ~CDList() throw(AssertionException) { - T* list = d_list; destroy(); - free(list); + + if(d_callDestructor) { + for(unsigned i = 0; i < d_size; ++i) { + d_list[i].~T(); + } + } + + free(d_list); } /** |