Add virtual destructor to avoid memory loss upon free

This commit is contained in:
Roland Kaufmann 2013-11-26 11:40:37 +01:00
parent a145c7489f
commit bf19e48e67

View File

@ -59,6 +59,13 @@ class WellState;
*/
class OutputWriter {
public:
/// Allow derived classes to be used in the unique_ptr that is returned
/// from the create() method. (Every class that should be delete'd should
/// have a proper constructor, and if the base class isn't virtual then
/// the compiler won't call the right one when the unique_ptr goes out of
/// scope).
virtual ~OutputWriter () { }
/*!
* \brief Write the static eclipse data (grid, PVT curves, etc) to disk
*/