You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2004/02/12 17:46:03 UTC

cvs commit: xml-xalan/c/samples/XPathWrapper TestDriver.cpp

dbertoni    2004/02/12 08:46:03

  Modified:    c/samples/XPathWrapper TestDriver.cpp
  Log:
  Turned on leak detection in debug build.
  
  Revision  Changes    Path
  1.17      +14 -1     xml-xalan/c/samples/XPathWrapper/TestDriver.cpp
  
  Index: TestDriver.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/samples/XPathWrapper/TestDriver.cpp,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestDriver.cpp	6 Jan 2004 02:41:27 -0000	1.16
  +++ TestDriver.cpp	12 Feb 2004 16:46:03 -0000	1.17
  @@ -77,12 +77,25 @@
   
   
   
  +// This is here for memory leak testing. 
  +#if !defined(NDEBUG) && defined(_MSC_VER)
  +#include <crtdbg.h>
  +#endif
  +
  +
  +
   int
   main(
   			int		argc,
   			char*	argv[])
   {
  -	XALAN_USING_STD(cerr)
  +#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
  +
  +    XALAN_USING_STD(cerr)
   	XALAN_USING_STD(cout)
   	XALAN_USING_STD(endl)
   	XALAN_USING_STD(ifstream)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org