Skip to content
Snippets Groups Projects
Commit e9504a5c authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

Destructors now virtual.

[[Imported from SVN: r954]]
parent 6e554955
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ namespace Dune {
ObjPointer (ObjType *t) : item (t) , next (0) {}
//! delete the next ObjPointer and the item
~ObjPointer ()
virtual ~ObjPointer ()
{
if(next) delete next;next = 0;
if(item) delete item;item = 0;
......@@ -37,9 +37,8 @@ namespace Dune {
//! make new operator with item points to null
ObjPointerStorage () : item_ (0) {}
~ObjPointerStorage ()
virtual ~ObjPointerStorage ()
{
std::cout << "delete Operator "<< this << " \n";
if(item_) delete item_;item_ = 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment