dbertoni    01/11/06 20:01:58

  Modified:    c/Tests/Transformer TestXalanTransformer.cpp
  Log:
  Fixed memory leak and added memory leaking testing code.
  
  Revision  Changes    Path
  1.5       +16 -0     xml-xalan/c/Tests/Transformer/TestXalanTransformer.cpp
  
  Index: TestXalanTransformer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/Tests/Transformer/TestXalanTransformer.cpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestXalanTransformer.cpp  2001/08/13 17:29:25     1.4
  +++ TestXalanTransformer.cpp  2001/11/07 04:01:58     1.5
  @@ -59,6 +59,13 @@
   #define TEST_XALAN_CPP
   
   
  +// This is here for memory leak testing.
  +#if defined(_DEBUG)
  +#include <crtdbg.h>
  +#endif
  +
  +
  +
   #include <util/PlatformUtils.hpp>
   
   
  @@ -117,6 +124,13 @@
                        int                             /* argc */,
                        const char*             /* argv[] */)
   {
  +#if !defined(NDEBUG) && defined(_MSC_VER)
  +     _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | 
_CRTDBG_LEAK_CHECK_DF);
  +
  +     _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
  +     _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
  +#endif
  +
        const char* const               theXMLFileName = 
"d:\\xslt\\xsl-test\\perf\\basic\\basic-all_well.xml";
        const char* const               theXSLFileName = 
"d:\\xslt\\xsl-test\\perf\\basic\\basic-all_well.xsl";
        const char* const               theOutFileName = 
"d:\\Transformer-Results\\basic-all_well.out";
  @@ -185,6 +199,8 @@
                theOutput << '\0';
   
                cout << theOutput.str();
  +
  +             theOutput.freeze(false);
   
                ostrstream      theOutput3;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to