You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Erik Rydgren <er...@mandarinen.se> on 2001/04/18 16:56:15 UTC
RE: Deallocating memory allocated by XMLString::transcode on Win32 platform
You are mixing runtimes. Read the FAQ.
/ Erik Rydgren
-----Original Message-----
From: Lyman Neuschaefer [mailto:lneuschaefer@tecomac.com]
Sent: den 18 april 2001 16:48
To: 'xerces-c-dev@xml.apache.org'
Subject: Deallocating memory allocated by XMLString::transcode on Win32
platform
Greetings,
The documentation indicates that XMLString::transcode() dynamically
allocates
memory to contain the content of the returned buffer and that it's the
responsibility
of the user to deallocate such memory. However, using delete and delete[]
cause
my application to fatal on an assert which insists that the memory be be
allocated
on a 'local' heap.
With Rational Purify I have confirmed that failure to delete the return
value from
transcode results in a memory leak. How can I deallocate such memory on
win32?
Thanks for your help
Lyman Neuschaefer
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Deallocating memory allocated by XMLString::transcode on Win32 platform
Posted by Ken Goldman <kg...@watson.ibm.com>.
This has to be the most frequently asked question I've ever seen on a
mailing list.
Would anyone consider putting the advice about the runtimes in the
documentation for the transcode method itself. I know this isn't
usually done, but if the purpose of documentation is to help the
developer, why not "break the rule"?
>
> You are mixing runtimes. Read the FAQ.
>
> / Erik Rydgren
>
> -----Original Message-----
[snipped question about XMLString::transcode()]
--
Ken Goldman kgold@watson.ibm.com 914-784-7646
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org