OSDN Git Service

CRT メモリリークチェックを追加
authorstarg <starg@users.osdn.me>
Wed, 31 Aug 2016 05:44:56 +0000 (14:44 +0900)
committerstarg <starg@users.osdn.me>
Wed, 31 Aug 2016 05:44:56 +0000 (14:44 +0900)
src/driver/yamml.cpp

index b825d1e..c2f8731 100644 (file)
@@ -1,4 +1,11 @@
 
+#if defined(_MSC_VER) && defined(_WIN32) && defined(_DEBUG)
+
+#include <crtdbg.h>
+
+#endif // _WIN32
+
+
 #include <algorithm>
 #include <iostream>
 #include <string>
@@ -33,6 +40,12 @@ int main(int argc, char** argv)
     static_cast<void>(argc);
     static_cast<void>(argv);
 
+#if defined(_MSC_VER) && defined(_WIN32) && defined(_DEBUG)
+
+    ::_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+
+#endif // _WIN32
+
     namespace PO = boost::program_options;
 
     PO::options_description visibleOptions("Options");