diff options
author | Carlo Zancanaro <carlo@carlo-laptop> | 2012-05-02 00:03:59 +1000 |
---|---|---|
committer | Carlo Zancanaro <carlo@carlo-laptop> | 2012-05-02 00:03:59 +1000 |
commit | 9fd34b8cdc98ee757fc047216bd51c698cb7b82f (patch) | |
tree | 234e634fdaab8b2f021dab91922f4f771f0472c6 /impl/Expression.hpp | |
parent | a26a426170bb0697115e6187887f18ad979b56f2 (diff) |
Fix up some memory leaking issues.
Diffstat (limited to 'impl/Expression.hpp')
-rw-r--r-- | impl/Expression.hpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/impl/Expression.hpp b/impl/Expression.hpp index 7b157c2..668f4fd 100644 --- a/impl/Expression.hpp +++ b/impl/Expression.hpp @@ -5,17 +5,14 @@ #include "VariableAssignment.hpp" #include "Operator.hpp" +int ExpressionCount; + template<typename T> struct Expression { Expression(Operator<T>* op, const std::vector< Expression<T>* >& args) : _operator(op), _arguments(args) { } virtual ~Expression() { - /*delete _operator; - for (typename std::vector< Expression<T>* >::iterator it = _arguments.begin(); - it != _arguments.end(); - ++it) { - delete *it; - }*/ + delete _operator; } virtual T operator() (const VariableAssignment<T>& assignment) const { return (*_operator)(_arguments, assignment); |