diff --git a/opm/core/simulator/SimulatorOutput.cpp b/opm/core/simulator/SimulatorOutput.cpp index 44b80a16..cfbf7547 100644 --- a/opm/core/simulator/SimulatorOutput.cpp +++ b/opm/core/simulator/SimulatorOutput.cpp @@ -60,6 +60,9 @@ SimulatorOutputBase::SimulatorOutputBase ( writer_->writeInit (*timer); } +// default destructor is OK, just need to be defined +SimulatorOutputBase::~SimulatorOutputBase() { } + SimulatorOutputBase::operator std::function () { // return (a pointer to) the writeOutput() function as an object // which can be passed to the event available from the simulator diff --git a/opm/core/simulator/SimulatorOutput.hpp b/opm/core/simulator/SimulatorOutput.hpp index 7a0fc061..3db38932 100644 --- a/opm/core/simulator/SimulatorOutput.hpp +++ b/opm/core/simulator/SimulatorOutput.hpp @@ -55,6 +55,12 @@ protected: std::shared_ptr state, std::shared_ptr wellState); + /** + * We need a destructor in the compilation unit to avoid the + * OutputWriter being a complete type here. + */ + virtual ~SimulatorOutputBase (); + /** * Conversion operator which allows the object to be directly passed * into an Event and used as a handler.