- Fix deletion using an ad-hoc functor to avoid memory leaks, instead that ptr_fun(operator delete). Valgrind says we're doing well with History\!
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@787 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
69a7ee03eb
commit
19ee5c1884
8 changed files with 62 additions and 8 deletions
|
@ -23,6 +23,8 @@
|
|||
#include "dynamic_thread.hh"
|
||||
#include "serialize_visitor.hh"
|
||||
|
||||
#include "deletor.tcc"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
|
@ -49,7 +51,8 @@ DynamicProcess::DynamicProcess(const DynamicProcess &other) :
|
|||
|
||||
DynamicProcess::~DynamicProcess()
|
||||
{
|
||||
for_each(_dynamic_threads.begin(), _dynamic_threads.end(), ptr_fun(operator delete));
|
||||
for_each(_dynamic_threads.begin(), _dynamic_threads.end(),
|
||||
memory::deletor<DynamicThread>());
|
||||
}
|
||||
|
||||
std::vector<Thread*>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue