In my application I have been running your solver multiple times in a single run, and I noticed a large memory build up. I also use the PairwiseTable object for assigning binary costs. Running the code in valgrind, I got the following warning.
My guess is that the issue is the following. It seems that in pairwisetable.impl.h in line 34 a dynamic array is created via new[], which needs to be deleted via delete[]. However, the resutls are saved in a std::unique_ptr:
Hi,
In my application I have been running your solver multiple times in a single run, and I noticed a large memory build up. I also use the PairwiseTable object for assigning binary costs. Running the code in valgrind, I got the following warning.
My guess is that the issue is the following. It seems that in
pairwisetable.impl.h
in line 34 a dynamic array is created via new[], which needs to be deleted viadelete[]
. However, the resutls are saved in astd::unique_ptr
:std::unique_ptr
, on the other hand, will calldelete
rather thandelete[]
, which causes this memory leak.