From 89354d0a0ce6fbb22ff262658045cdb8796ff6fd Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Fri, 04 May 2018 20:52:05 +0000
Subject: [PATCH] Fixed memory leaks. And fixes for Web-camera and IP-camera.
---
src/darknet.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/darknet.c b/src/darknet.c
index 627b6db..74ac16a 100644
--- a/src/darknet.c
+++ b/src/darknet.c
@@ -1,3 +1,8 @@
+#ifdef _DEBUG
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
+
#include <time.h>
#include <stdlib.h>
#include <stdio.h>
@@ -350,6 +355,10 @@
int main(int argc, char **argv)
{
+#ifdef _DEBUG
+ _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
+#endif
+
//test_resize("data/bad.jpg");
//test_box();
//test_convolutional_layer();
--
Gitblit v1.10.0