generated bean constructor(), destructor() and reset() methods not consistent
-----------------------------------------------------------------------------

                 Key: AXISCPP-1050
                 URL: https://issues.apache.org/jira/browse/AXISCPP-1050
             Project: Axis-C++
          Issue Type: Bug
          Components: WSDL processing - Doc, WSDL processing - RPC
            Reporter: nadir amra
            Assignee: nadir amra


Currently. a generated constructor, destructor and reset methods looks like:

aRecord::aRecord()
{
        reset();
}

aRecord::~aRecord()
{
        if(__axis_deepcopy_field1)
                delete  field1;
}

void aRecord::reset()
{
        field1 = NULL;
        __axis_deepcopy_field1 = false;
}

This does not make sense.  a reset method should reclaim storage if necessary.  
And the constructor should contain the code in what is currently reset() above. 
 And the destructure should call reset().  So the new code would be something 
like the following:

aRecord::aRecord()
{
        field1 = NULL;
        __axis_deepcopy_field1 = false;
}

aRecord::~aRecord()
{
     reset();
}

void aRecord::reset()
{
        if(__axis_deepcopy_field1)
                delete field1;
        field1 = NULL;
        __axis_deepcopy_field1 = false;
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to