diff options
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_expression.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_expression.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/TAO/TAO_IDL/ast/ast_expression.cpp b/TAO/TAO_IDL/ast/ast_expression.cpp index 8f27b0346a0..aac7235ff2c 100644 --- a/TAO/TAO_IDL/ast/ast_expression.cpp +++ b/TAO/TAO_IDL/ast/ast_expression.cpp @@ -3179,11 +3179,19 @@ AST_Expression::ast_accept (ast_visitor *visitor) void AST_Expression::destroy (void) { - if (0 != this->pd_ev && EV_string == this->pd_ev->et) + if (0 != this->pd_ev) { - this->pd_ev->u.strval->destroy (); - delete this->pd_ev->u.strval; - this->pd_ev->u.strval = 0; + if (EV_string == this->pd_ev->et) + { + this->pd_ev->u.strval->destroy (); + delete this->pd_ev->u.strval; + this->pd_ev->u.strval = 0; + } + else if (EV_wstring == this->pd_ev->et) + { + ACE::strdelete (this->pd_ev->u.wstrval); + this->pd_ev->u.wstrval = 0; + } } delete this->pd_ev; |