diff --git a/common/smartpointer.hh b/common/smartpointer.hh index 52ead57f6d4f4e3b0082ad4f2b976c0687ce5c1b..79fe420c3021f1601a16f75a8bb5f6f6548d2b81 100644 --- a/common/smartpointer.hh +++ b/common/smartpointer.hh @@ -94,6 +94,8 @@ namespace Dune PointerRep() : count_(1), rep_(new MemberType) {} /** @brief Constructor from existing Pointer. */ PointerRep(MemberType * p) : count_(1), rep_(p) {} + /** @brief Destructor, deletes MemberType* rep_. */ + ~PointerRep() { delete rep_; } } *rep_; };