Commit 8ff45cf6b8ec32b8ed08c2b2a35d749842a5d64c
1 parent
8c5da493
Make sure that memory is freed in GCTAEventList::dispose()
Showing
1 changed file
with
4 additions
and
0 deletions
inst/cta/src/GCTAEventList.cpp
| ... | ... | @@ -798,6 +798,10 @@ void GCTAEventList::dispose(void) const |
| 798 | 798 | m_events.clear(); |
| 799 | 799 | m_columns.clear(); |
| 800 | 800 | |
| 801 | + // Now actually remove the memory reserved for these objects | |
| 802 | + std::vector<GCTAEventAtom>(m_events).swap(m_events); | |
| 803 | + std::vector<GFitsTableCol*>(m_columns).swap(m_columns); | |
| 804 | + | |
| 801 | 805 | // Return |
| 802 | 806 | return; |
| 803 | 807 | } | ... | ... |