]> granicus.if.org Git - libexpat/commitdiff
Add MSVC call to chcek for memory leaks
authorJames Clark <jjc@jclark.com>
Sat, 13 Dec 1997 09:11:15 +0000 (09:11 +0000)
committerJames Clark <jjc@jclark.com>
Sat, 13 Dec 1997 09:11:15 +0000 (09:11 +0000)
expat/xmlwf/xmlwf.c

index 94a93111aa04f4e6e7bf9a524de6fa319159d5d2..a0e3381cc8365d20cb69f35c99905b3bfb9ad3b8 100755 (executable)
@@ -2,6 +2,9 @@
 #include <string.h>
 #include "wfcheck.h"
 #include "filemap.h"
+#ifdef _MSC_VER
+#include <crtdbg.h>
+#endif
 
 struct ProcessFileArg {
   enum EntityType entityType;
@@ -37,6 +40,9 @@ int main(int argc, char **argv)
   int ret = 0;
   struct ProcessFileArg arg;
 
+#ifdef _MSC_VER
+  _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
+#endif
   arg.entityType = documentEntity;
 
   if (i < argc && strcmp(argv[i], "-g") == 0) {