EpochTracker's destructor not freeing memory
kkawabat opened this issue · 1 comments
I am trying to wrap reaper as a c extension for a python program however I noticed that there is a memory leak when calling a modified version of epoch_tracker_main.cc
I am not too familiar with C++ but the destructor for EpochTracker is empty
so I've added a call to CleanUp() method inside the destructor and and the leak seems to disappear.
EpochTracker::~EpochTracker(void) {
CleanUp();
}
I was wondering if this makes sense as I am unfamiliar with c++ conventions
Memory management in Reaper is far from ideal. I believe your solution is adequate and I wonder why that wasn't already used already from the destructor. The only possible explanation I can think of is that it was giving problems at some point.
I've made the changed you proposed and I'll track that it doesn't produce any problems.