[xml] switching to Delphi MM succeeded

Hello all,

I have finally found and fixed the last problem with switching to the Delphi memory manager, and now I can 
confirm that it really
works without problems.

What was the problem that delayed my confirmation ?

My first implementation of DelphiStrdupFunc used Delphi function StrNew(); this allocation seems to be 
incompatible with GetMem, and
therefore cannot be released with FreeMem. When I changed the implementation to use GetMem and copied the 
original string manually,
it started to work.
This difference appeared when I called function xmlParseFile; its call to  xmlFreeParserContext hanged inside 
when releasing string "input->directory" (which was created by xmlStrDup). It's strange that it doesn't hang 
one line above, but
there perhaps is a reason (somewhere deep in the universe :-)

I created a simple testing program, it's in the libxml2-pas CVS in /demos/libxml2/test - try it if you like.

I want to thank you all for collaboration

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]