summaryrefslogtreecommitdiffstats
path: root/src/definition.h
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2015-09-12 21:57:57 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2015-09-13 10:02:42 (GMT)
commitd14bcd1f8f5bd4a2034bae842000630f4e098eb6 (patch)
tree31881747a1dd53684a95036c2921a6fe2ab8b25c /src/definition.h
parent76a9892b190efaeb3c764d824bd285ff3d2c57dc (diff)
downloadDoxygen-d14bcd1f8f5bd4a2034bae842000630f4e098eb6.zip
Doxygen-d14bcd1f8f5bd4a2034bae842000630f4e098eb6.tar.gz
Doxygen-d14bcd1f8f5bd4a2034bae842000630f4e098eb6.tar.bz2
Fixed a number of memory leaks in the template engine
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: