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 bu...@apache.org on 2001/11/12 21:25:11 UTC
DO NOT REPLY [Bug 4817] New: -
Can't free memory allocated by DOMString::transcode
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4817>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4817
Can't free memory allocated by DOMString::transcode
Summary: Can't free memory allocated by DOMString::transcode
Product: Xerces-C++
Version: 1.4
Platform: Other
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: jeliyesil@askjeeves.com
According to the comments in the header file, the caller owns the char * array
that is returned from transcode, and should delete it. We were leaking memory
on every call to transcode, so we have tried deleting the char * pointer
returned from transcode, but the delete results in an exception with the
following stack:
NTDLL! 77f762e8()
NTDLL! 77f83274()
KERNEL32! 77f12e2e()
_CrtIsValidHeapPointer(const void * 0x01709fb0) line 1606
_free_dbg_lk(void * 0x01709fb0, int 1) line 1011 + 9 bytes
_free_dbg(void * 0x01709fb0, int 1) line 970 + 13 bytes
free(void * 0x01709fb0) line 926 + 11 bytes
operator delete(void * 0x01709fb0) line 7 + 9 bytes
Here is the code that we are executing:
char *p = start.getNodeName().transcode();
string name = p;
bool bMatch = (name == firstFind);
if (p)
delete [] p;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org