diff options
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_constant.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_constant.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/ast/ast_constant.cpp b/TAO/TAO_IDL/ast/ast_constant.cpp index b79f18b51f1..a08c833c3a6 100644 --- a/TAO/TAO_IDL/ast/ast_constant.cpp +++ b/TAO/TAO_IDL/ast/ast_constant.cpp @@ -162,11 +162,6 @@ AST_Constant::AST_Constant (AST_Expression::ExprType t, AST_Constant::~AST_Constant (void) { - if (this->pd_constant_value != 0) - { - delete this->pd_constant_value; - this->pd_constant_value = 0; - } } // Redefinition of inherited virtual operations. @@ -187,6 +182,17 @@ AST_Constant::ast_accept (ast_visitor *visitor) return visitor->visit_constant (this); } +void +AST_Constant::destroy (void) +{ + if (this->pd_constant_value != 0) + { + this->pd_constant_value->destroy (); + delete this->pd_constant_value; + this->pd_constant_value = 0; + } +} + // Data accessors. AST_Expression * |