axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Whitlock <>
Subject More C/C++ support
Date Wed, 06 Oct 2004 11:58:38 GMT

Is it OK to pass STL strings, lists, etc across the external client API? I
remember that this was frowned upon.

So there's several methods on Call and IWrapperSoapDeserializer like
getElementAsString which return a strdup'ed C-style string that the
application has to free.
When making the engine pure C++, I would prefer these changed to using STL
strings. Else these could change to a new char[].

Most parts of the external client API assume that the application should
delete the returned storage (such as Call::getElementAsString and many
others) but other methods (such as ISoapFault::getFaultcode) delete the
storage in ~SoapFault. This isn't a memory leak as such, but it does make
it very easy to write applications with memory leaks. I propose that
(wherever possible) it should be up to the application to delete the
storage for strings returned from these methods, and the documentation for
all methods that return strings or other data, should say whose
responsibility it is to delete the storage.

Mark Whitlock

View raw message