Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I must say that I´m starting to use TinyXML library and I´m not the best programmer with C++ (yet), and I´m having some memory leaks, but I have no idea of how to get rid of them and I´m not sure if the problem is mine or has something to do with the library itself.
I think the best thing to do is to post here the programs I wrote, the first one reads from an XML and the second one is a "reads from and writes to" an XML program.
In order to get all the memory-leaks visible, I write
at the begining of main.cpp
before the return statement in main.cpp
The memory-leaks are shown in the Visual "Output" Menu after the compilation
I don´t know if there is a better way of tracking memory-leaks down (probably there is, but I just don´t know them)
In the "reading from the XML" program, I don´t write any "new" statement myself, so that is what puzzles me the most. How can I have memory leaks if I don´t manage memory dinamicaly at all? However, there are… so I guess it must have something to do with the library itself. But from what I´ve read online, it manages to delete all the Nodes added to the XML object, even the dynamic ones. If I tell you the truth I have no idea of what I´m doing wrong.
Here you can download the "Read-only" program:
And there are some more memory leaks in the reading-writting program, but these ones, even when I thought the TinyXML class itself should get rid of them (and from what I had read online it does), however, it doesn´t.
Here you can download the writing-reading program:
Thanks a lot to everyone in advance… You have no idea of how much you´d help me if you fix this problem up. I know that the problem can be anywhere since my knowledge with classes and inheritances is still a bit weak… but I will get through it!!!!