From 8ff45cf6b8ec32b8ed08c2b2a35d749842a5d64c Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Fri, 21 Jul 2017 12:46:39 +0200 Subject: [PATCH] Make sure that memory is freed in GCTAEventList::dispose() --- inst/cta/src/GCTAEventList.cpp | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) diff --git a/inst/cta/src/GCTAEventList.cpp b/inst/cta/src/GCTAEventList.cpp index 2954e5f..e92f422 100644 --- a/inst/cta/src/GCTAEventList.cpp +++ b/inst/cta/src/GCTAEventList.cpp @@ -798,6 +798,10 @@ void GCTAEventList::dispose(void) const m_events.clear(); m_columns.clear(); + // Now actually remove the memory reserved for these objects + std::vector(m_events).swap(m_events); + std::vector(m_columns).swap(m_columns); + // Return return; } -- libgit2 0.21.4