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 "Ing. Hans Pesata" <hp...@chello.at> on 2001/08/05 13:36:14 UTC

Xerces with MFC / conclusions

Hi !

I discoverd a few things:

* using L"..." instead of XMLString::transcode(...) fixes some of the
memory-leaks.
  as far as I understand, XMLString::transcode() creates a new string, which
has to be deleted.
  this doesnt seem to be neccessary in the samples.

* deleting the parser-obejct after using it fixes the otehr memory leaks.
  this also doesnt seem to be neccessary in the samples.

* when I use these 2 actions with the 1.4.0 dll, everything works fine,
  no more memory leaks.

* when I use it with the 1.5.1 dll, memory leaks still appear.
  I realized, that when I am not using the 2 features

  parser -> setFeature(L"http://xml.org/sax/features/validation", true);
  parser -> setFeature(L"http://apache.org/xml/features/validation/dynamic",
false);

  everything works fine, no more leaks ...

  but when I use the NT-short-filenames (DOS 8.3) and the case-sensitive
file-path for the XML-file
  I am parsing things look better. I suppose this comes from the UNIX-world.

I will do further investigations !

Regards,
Hans Pesata


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


AW: Xerces with MFC / conclusions

Posted by "Ing. Hans Pesata" <hp...@chello.at>.
Hi !

// * when I use it with the 1.5.1 dll, memory leaks still appear.
//   I realized, that when I am not using the 2 features
//
//   parser -> setFeature(L"http://xml.org/sax/features/validation", true);
//   parser ->
setFeature(L"http://apache.org/xml/features/validation/dynamic", false);
//
//   everything works fine, no more leaks ...
//
//   but when I use the NT-short-filenames (DOS 8.3) and the case-sensitive
file-path for the XML-file
//   I am parsing things look better. I suppose this comes from the
UNIX-world.

I have to correct this point from my previous message, it seemed to work
with the short filenames,
because the parser didnt find the XML-file and just did nothing.
there was no exception on the missing file.

when I use the validation-feature with the 1.5.1 dll, a lot of leaks and
access violations occur:

...

#File Error#(552) : {2958} First-chance exception in Designer.exe
(KERNEL32.DLL): 0xC0000005: Access Violation.
normal block at 0x0094D260, 20 bytes long.
 Data: <                > 06 00 00 00 CD CD CD CD 1F 00 00 00 00 00 00 00
#File Error#(552) : {2956} normal block at 0x0094D2E0, 20 bytes long.
 Data: <                > 06 00 00 00 CD CD CD CD 02 00 00 00 00 00 00 00
#File Error#(552) : {2955} First-chance exception in Designer.exe
(KERNEL32.DLL): 0xC0000005: Access Violation.
First-chance exception in Designer.exe (KERNEL32.DLL): 0xC0000005: Access
Violation.
normal block at 0x0094D320, 20 bytes long.
 Data: <                > 06 00 00 00 CD CD CD CD 1E 00 00 00 00 00 00 00
#File Error#(552) : {2953} normal block at 0x0094D3A0, 20 bytes long.
 Data: <                > 06 00 00 00 CD CD CD CD 01 00 00 00 00 00 00 00

...

I am not using a content/error-handler.

when I use the 1.4.0 dll, everything looks fine, no more leaks and
access-violations...

So it looks that currently the 1.4.0 dll is the way to go ?
I would appreciate comments and suggestions !

Thanx in advance,

Regards,
Hans Pesata


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org