[opengtl-commits] [150] memory leak fix : delete accessors

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 150
Author:   cyrille
Date:     2008-04-29 11:34:28 +0200 (Tue, 29 Apr 2008)

Log Message:
-----------
memory leak fix : delete accessors

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/Accessor_p.cpp
    trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp


Modified: trunk/OpenGTL/OpenGTL/GTLCore/Accessor_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Accessor_p.cpp	2008-04-29 08:55:48 UTC (rev 149)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Accessor_p.cpp	2008-04-29 09:34:28 UTC (rev 150)
@@ -35,6 +35,7 @@
 #include "ErrorMessages_p.h"
 #include "ExpressionResult_p.h"
 #include "VariableNG_p.h"
+#include "Utils_p.h"
 
 #include "AST/Expression.h"
 
@@ -143,6 +144,7 @@
 
 ArrayAccessor::~ArrayAccessor()
 {
+  delete m_accessor;
 }
 
 
@@ -293,6 +295,7 @@
 
 StructureAccessor::~StructureAccessor()
 {
+  deleteAll( m_accessors );
 }
 
 llvm::Value* StructureAccessor::pointerToValue( GenerationContext& /*_generationContext*/,

Modified: trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-04-29 08:55:48 UTC (rev 149)
+++ trunk/OpenGTL/OpenGTL/GTLCore/VariableNG_p.cpp	2008-04-29 09:34:28 UTC (rev 150)
@@ -48,6 +48,7 @@
 }
 VariableNG::~VariableNG()
 {
+  delete d->accessor;
   delete d;
 }
 bool VariableNG::constant() const


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/