From 81f4c2aa109017a550510fdfb485f69687974da3 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 20 Nov 2014 00:33:22 +0100 Subject: [PATCH] Revert memory leak patch in Monitor class (break analysis) --- src/zm_monitor.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 8b8aa0403..18d3d0db8 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1241,6 +1241,7 @@ bool Monitor::Analyse() if ( static_undef ) { + static_undef = false; timestamps = new struct timeval *[pre_event_count]; images = new Image *[pre_event_count]; last_signal = shared_data->signal; @@ -1625,13 +1626,6 @@ bool Monitor::Analyse() last_signal = signal; } - if ( static_undef ) - { - delete[] timestamps; - delete[] images; - static_undef = false; - } - shared_data->last_read_index = index%image_buffer_count; //shared_data->last_read_time = image_buffer[index].timestamp->tv_sec; shared_data->last_read_time = now.tv_sec;