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 Bala Ayres <ba...@XSeLlence.com> on 2000/07/28 21:05:33 UTC

Memory leak/core dump - Linux Mandrake

It is probably my lack of understanding of how the strings work in
Xerces that i resorted to using XMLString::transcode

In order to store the Element's fullname, contentModel's formatted name
and attribute name, i use the following construct to allocate memory
 xmlElement[DTDElementCnt]= (char *)
malloc(strlen(XMLString::transcode(curElem.getFullName())));
...of course checking for null and all that in between

if do the same for getFormattedContentModel and getFullName() for
attributes.

the program runs ok almost till the end - resulting in a SIGSEGV fault
the back trace of which is as follows
   chunk_free -
  __builtin_vec_delete()
  ~XMLElementDecl() ----> from libxerces-c_1_2.so

  DTDElementDecl::~DTDElementDecl()
 ....
 ....
and so on.

It appears as though there may be some memory leak in the destructors -
then again i am no expert to diagnose this...Just my .02

Thanks

BAyres
Xsellence Inc.


P.S. The program itself is 157652 Bytes and is a medley of C and C++
code.