TinyXML++ memory leaks

Started by
9 comments, last by SiS-Shadowman 15 years, 3 months ago
How did you compile your tinyxml project?
I've been working on a smaller (and simpler) version of Visual Leak Detector (mostly for learning purposes) and while I did this I noticed that if I create a project as a static library and link it with another executable, the overwritten new and delete functions of my leak detector were called in a wrong way (delete[] in a module in the static lib was redirected to delete (without [] brackets) in my leak detector) or not at all. This behaviour vanished when I linked the leak detector against the static library as well as against the executable.

If you've compiled tinyxml as a dll, then you need to link visual leak detector to that one as well (or it won't be able to detect the deallocation of the 'Element'), although you propably already know that.

As far as I know, the leak detector works in a similar way (overwriding operator new, and so on) and I assume it could suffer from the same problems as mine did.

Hope that helps :)

This topic is closed to new replies.

Advertisement