> Hi,
> I am currently using the XPathWrapper example as a model for my
application.  I've created a pointer to an object from
> the XalanSourceTreeParserLiaison class and allocated memory using "new".
>
>                 m_pLiaison                      = new
XalanSourceTreeParserLiaison(*m_pDOMSupport);
>
> However, whenever I attempt to delete the object (m_pLiaison) I get a
"Unhandled exception in XalanSourceTreeD.DLL:
> Access Violation" error.

Are you linking with the correct run-time libraries?  This is a FAQ:

   http://xml.apache.org/xerces-c/faq-build.html#faq-11
   http://xml.apache.org/xalan-c/faq.html#faq-5

Have you applied the Dinkumware patches or rebuild the binaries yourself?
Are you using the same Service Pack?  Here's the FAQ:

   http://xml.apache.org/xalan-c/faq.html#faq-6

> If I don't do a delete, then I get memory leaks in areas where the
element and comment nodes are created in the
> XalanSourceTreeContentHandler.  It appears that
XalanSourceTreeDocument::createElementNode(...) and
> XalanSourceTreeDocument::createCommentNode(...) do not clean up the
memory once the objects are created and added
> to the Xalan Source Tree.

That's not surprising, since not deleting something you allocated is by
definition a memory leak.  Showing the stack trace where the leak occurred
is useless, since it's a symptom of not deleting the object.  Showing the
stack trace where the unhandled exception occurs might be more interesting.

By the way, please configure your email client not to send styled text to
the list.  It adds no value, and makes it harder for many people to read
your mail.

Dave


Reply via email to