axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "nadir amra (JIRA)" <axis-c-...@ws.apache.org>
Subject [jira] Created: (AXISCPP-1050) generated bean constructor(), destructor() and reset() methods not consistent
Date Fri, 18 Jul 2008 23:41:31 GMT
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: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message