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 Peter Morrone <pm...@optonline.net> on 2002/05/19 05:15:47 UTC

Mem Leak using MFC with Shared DLL

Hi all,

I am new to this board and xerces.  Please forgive my ignorance.  I
searched the archive but found no solution to my problem.  I am trying
to use xerces with an mfc application using MFC as a shared DLL in the
project settings.  I get memory leaks when I exit seeming relating to
DOMStrings.  Causal inspection shows that for every DOMSting I use, I
get a memory leak.  If I build the application using MFC as a static
library, then the leaks are gone.

I downloaded a sample application from the book C++ XML and found the
same to be true with this application, when built with MFC as a shared
DLL it has leaks, when built using MFC as a static library all is fine.

I have the proper initialize/terminate calls and they are definitely
getting executed (much more leaks present if I don't terminate).  Any
help would be greatly appreciated. The demo Application I spoke of can
be downloaded at http://www.postgraphy.com/cppxml/update2/index.html

I have the xerces library built with the "Not Using MFC" setting.
Should I change this, I tried to build it as Using MFC as a Shared DLL.
But there were link errors.

Peter Morrone
Five Stones Development
1 Noel Place 
Smithtown NY
11787
peterm@fivestones.biz
http://www.fivestones.biz
(631) 724-4426
(631) 724-4432 (fax)