- 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
|
@ -24,6 +24,8 @@
|
|||
#include "sub_request.hh"
|
||||
#include "thread.hh"
|
||||
|
||||
#include "deletor.tcc"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <functional>
|
||||
|
@ -162,7 +164,8 @@ ConcreteEnvironment::~ConcreteEnvironment()
|
|||
{
|
||||
// This call will invoke the DynamicProcess virtual destructor
|
||||
// Which will delete on cascade all DynamicThreads and so on.
|
||||
for_each(_processes.begin(), _processes.end(), ptr_fun(operator delete));
|
||||
for_each(_processes.begin(), _processes.end(),
|
||||
memory::deletor<Process>());
|
||||
|
||||
// We do the same with Resources.
|
||||
for(Resources::iterator it = _resources.begin(); it != _resources.end(); it++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue