Just being anal but:
char *sp = s.transcode();
std::cout << sp;
delete sp;
std::cout << "transcode() string deleted\n";
return 0;
is in error. It should be "delete [] sp" or you will get undefined results.
--
Dean Roddey
Software Geek Extraordinaire
Portal, Inc
[EMAIL PR
, 2001 11:32 PM
Subject: RE: Problem deleting transcoded data
> I gather the app uses all static libraries except for xerces.
> On Solaris this should not be a problem as the following code
> demonstrates:
> /* transcode_test.cpp */
> #include
> #include
I gather the app uses all static libraries except for xerces.
On Solaris this should not be a problem as the following code
demonstrates:
/* transcode_test.cpp */
#include
#include
#include
int main(int argc, char *argv[])
{
XMLPlatformUtils::Initialize();
DOMString s("Some text!\n");
c
Ray,
I use Xerces-C on Solaris, HPUX, and AIX, and have had no problems with
the memory. I'm currently using Xerces 1.3.1, because that's the API our
code was written against. Since it looks like 1.5 will soon be out, I will
have
to look at moving to 1.4 - I don't like bleading edge stuff - I pre
My programs on solaris use only 1 heap (I've done NT c++ before & the
general rule I've used in WIN32 programming is that memory allocated by a
method/function within a DLL must be free'd by a method/function from the
same dll so that the allocating heap is used).
You might want to fire up BoundsC
Any separately linkable unit (DLL/Exe) that uses a non-DLL runtime is going
to have to get its own runtime. If you don't use the DLL runtime, you should
statically link Xerces into your program directly.
--
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
[EMAI