axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Dick <adrian.d...@uk.ibm.com>
Subject Re: Where to deallocate memory for server-sided return values?
Date Wed, 23 Aug 2006 14:23:15 GMT
Hi,

If you're using Axis C++ 1.6beta (or a more recent nightly build) the
combination of the Axis engine and generated server skeletons will ensure
the value returned from the service is deallocated.

Regards,
Adrian
_______________________________________
Adrian Dick (adrian.dick@uk.ibm.com)


<rh@medialines.de> wrote on 23/08/2006 08:44:25:

> Hi,
>
> can anybody tell me where i can deallocate allocated memory for
> result-values (e.g. strings or ArrayOfStrings) on server side?
> Or is this done by axis itself?
>
> Example of such a server-side method:
>
> ArrayOfstring* ServerSideClass::getStringList()
> {
>     // Allocate memory:
>     ArrayOfstring* resultArray = new ArrayOfstring;
>     int resultArraySize = 3;
>     resultArray->item.m_Array = new xsd__string[resultArraySize];
>     resultArray->item.m_Size = resultArraySize;
>
>     // Fill the resultArray:
>     resultArray->item.m_Array[0] = "String1";
>     resultArray->item.m_Array[1] = "String2";
>     resultArray->item.m_Array[2] = "String3";
>     return resultArray;
>
>     // BUT WHERE TO DEALLOCATE THE resultArray ???
> }
>
> THANKS FOR ANY HELP!!
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-user-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message