Commit a1387fe8 authored by Luca Bertagna's avatar Luca Bertagna
Browse files

Destructor of MatrixEpetra and VectorEpetra MUST be virtual, since there are...

Destructor of MatrixEpetra and VectorEpetra MUST be virtual, since there are already other classes inheriting from it, and memory leak (at best) would happen if some of the derived classes is created on the heap.
parent 2a659d7f
......@@ -136,7 +136,7 @@ public:
MatrixEpetra ( const MapEpetra& map, matrix_ptrtype crsMatrixPtr);
//! Destructor
~MatrixEpetra() {};
virtual ~MatrixEpetra() {};
//@}
......
......@@ -144,7 +144,7 @@ public:
VectorEpetra ( const VectorEpetra& vector, const Int& reduceToProc );
//! Destructor
~VectorEpetra() {}
virtual ~VectorEpetra() {}
//@}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment