We have an application developed using Delphi 5 that we cannot upgrade to Delphi 6 or later for some reasons that are not important here.
Some time ago we had to implement XML processing into that application, and I decided to copy the implementation that we made for other applications using Delphi 6.
Everything went fine. I translated the Delphi 6 sources (msxml.pas, xmldoc.pas, msxmldom.pas, etc.) to Delphi 5. Minor adjustments had to be done on each file (like removing Variants uses for example). It worked, but I'm facing some problems with memory releasing.
I believe the problem is related to how Delphi 5 and Delphi 6 implements interfaces. I just copied the interfaces and their implementations from Delphi 6 to 5. Delphi is not releasing the memory properly. Debugging the code we determined that the origin of the problem is on TXMLDocument.ReleaseDoc
on XMLDoc.pas. Seems like the line FDOMDocument := nil
is not releasing the memory that it was supposed to do.
Can anybody give me some help on this? If we can't fix this we'll have to recode the whole thing using another XML library.