axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adrian Dick (JIRA)" <>
Subject [jira] Commented: (AXISCPP-507) Memory leaks in deserialize methods of XSD classes (in src/soap/xsd)
Date Mon, 07 Mar 2005 09:43:52 GMT
     [ ]
Adrian Dick commented on AXISCPP-507:

While I agree that deleting storage in the destructor would be neatest solution for avoiding
memory leaks, when I wrote these classes it wasn't quite so simple to do this.

These xsd objects have a very short lifecycle within the engine, and yet are typically nested
several layers into the engine, meaning we'd need to carry out several deep copies before
handing back to the customer application.  Personally, I think this is a more robust way to
program, but there are numerous routes by which we can reach these XSD objects, all of which
will need reworking.

The best compromise is probably making a deep copy in the generated stubs, then deleting the
storage, as I believe was Samisa's proposal.

> Memory leaks in deserialize methods of XSD classes (in src/soap/xsd)
> --------------------------------------------------------------------
>          Key: AXISCPP-507
>          URL:
>      Project: Axis-C++
>         Type: Bug
>   Components: SOAP
>     Versions: current (nightly)
>     Reporter: Samisa Abeysinghe
>      Fix For: 1.5 Final

> Deserialize method returns a pointer that is never deleted. The generated code, dereferances
the pointer and returns values to the Stub.
> Hence, the generated code should take care of the clearance of memeory.
> I tried to release this  memeory in the destructor of the XSD class, but then by the
time the generated code tries to access the value, the pointer is no more. This leaves the
only option of deleting the memory returned in the generated code where it invokes the respective
> Alternatively, we can make the XSD class manage its own memory and let the code accessing
the memory make a deep copy of the returned pointer (that is generated code)
> Whateve the fix would be, it needs changes to code generator.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
If you want more information on JIRA, or have a bug to report see:

View raw message