Closed RyanAveryBSU closed 2 years ago
edit: this is the warning I am getting when I call delete(myClassList);
warning: deleting object of polymorphic class type 'LinkedList<MyClass*>' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor] delete(myClassList);
After some googleing it seems that its not "might cause" but actually "100% does cause" undefined behaviour
Does MyClass have a virtual destructor? I think this issue can be closed, it is almost a year old and we haven't heard anything new since.
I added a pull request to fix this: https://github.com/ivanseidel/LinkedList/pull/45
-wall using this class gives me a message about calling delete on a linkedlist<obj> about a non-virtual deconstructor which leads to a undetermined state