Browse Source

Ensured expressions are properly destroyed thus fixing a memory leak.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/600/head
Dimitar Dobrev 10 years ago
parent
commit
1340113332
  1. 2
      src/CppParser/AST.cpp
  2. 1
      src/CppParser/AST.h

2
src/CppParser/AST.cpp

@ -498,6 +498,8 @@ DEF_STRING(Statement, String) @@ -498,6 +498,8 @@ DEF_STRING(Statement, String)
Statement::Statement(const std::string& str, StatementClass stmtClass, Declaration* decl) : String(str), Class(stmtClass), Decl(decl) {}
Statement::~Statement() {}
Expression::Expression(const std::string& str, StatementClass stmtClass, Declaration* decl)
: Statement(str, stmtClass, decl) {}

1
src/CppParser/AST.h

@ -498,6 +498,7 @@ class CS_API Statement @@ -498,6 +498,7 @@ class CS_API Statement
{
public:
Statement(const std::string& str, StatementClass Class = StatementClass::Any, Declaration* decl = 0);
virtual ~Statement();
StatementClass Class;
Declaration* Decl;
STRING(String)

Loading…
Cancel
Save