summaryrefslogtreecommitdiffstats
path: root/src/definition.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/definition.h')
-rw-r--r--src/definition.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/definition.h b/src/definition.h
index 2a66ebc..6277c6c 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -92,7 +92,10 @@ class DefinitionIntf
class Definition : public DefinitionIntf
{
public:
- struct Cookie {};
+ struct Cookie
+ {
+ virtual ~Cookie() {}
+ };
/*! Create a new definition */
Definition(
@@ -345,7 +348,7 @@ class Definition : public DefinitionIntf
void addSectionsToIndex();
void writeToc(OutputList &ol);
- void setCookie(Cookie *cookie) { m_cookie = cookie; }
+ void setCookie(Cookie *cookie) { delete m_cookie; m_cookie = cookie; }
Cookie *cookie() const { return m_cookie; }
protected: