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; }