From bf31003d74f538a9096ef5999b31b0daa58c38c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jeroen=20B=C3=A9dorf?= Date: Thu, 2 Apr 2015 12:04:31 +0200 Subject: Fix memory leak in the config --- include/astra/Config.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/astra/Config.h') diff --git a/include/astra/Config.h b/include/astra/Config.h index 9893c90..0230dbe 100644 --- a/include/astra/Config.h +++ b/include/astra/Config.h @@ -51,6 +51,8 @@ struct _AstraExport Config { XMLNode* self; XMLNode* global; + + XMLDocument *_doc; }; struct ConfigCheckData { -- cgit v1.2.3 From 47fe3421585302f2101691a685ab99b0e1ad5cfc Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 1 May 2015 17:48:32 +0200 Subject: Change XMLNode* to XMLNode An XMLNode object is already simply a pointer, so no need to dynamically allocate XMLNodes. --- include/astra/Config.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/astra/Config.h') diff --git a/include/astra/Config.h b/include/astra/Config.h index 0230dbe..c10a16e 100644 --- a/include/astra/Config.h +++ b/include/astra/Config.h @@ -44,13 +44,12 @@ namespace astra { struct _AstraExport Config { Config(); - Config(XMLNode* _self); + Config(XMLNode _self); ~Config(); void initialize(std::string rootname); - XMLNode* self; - XMLNode* global; + XMLNode self; XMLDocument *_doc; }; -- cgit v1.2.3