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 nacho <na...@iie.edu.uy> on 2001/11/09 18:53:20 UTC
problem with DOMString::transcode
Hi,
I'm having a problem while using this method in a little
example I wrote in MSVC.
I do something like:
char *s = elem.getAttribute("attr").transcode();
a = strtoul(s,NULL,10); // attr is an integer attribute
delete[] s; <-- error here
And the program exits with a Debug Assertion Exception
in dbgheap.c in _CrtIsValidHeapPointer(pUserData).
This function is called from free() which in turn is called from
delete().
The name of the function suggests that s is not a valid heap
pointer right? How can this be possible? I examined the
DOMString::transcode() code and looks right. the returned
pointer is allocated there with an ordinary new char[...] and
the responsability to delete it is, as the docs says, of the
caller.
Could this be a configuration problem? I mean, the DLL is a
Debug/Multithreaded DLL and the test program is Single-Threaded.
ANY clue??
--
Saludos,
nacho mailto:nacho@iie.edu.uy
--
"Yo no soy paranoico. Eso es lo que *ellos* quieren que piense"
--
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org