- 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,7 @@
|
|||
#include "module.hh"
|
||||
#include "global_preferences.hh"
|
||||
|
||||
#include "deletor.tcc"
|
||||
#include "singleton.tcc"
|
||||
|
||||
#include <glibmm/fileutils.h>
|
||||
|
@ -48,7 +49,8 @@ PluginManager::rescan_dirs()
|
|||
{
|
||||
Module* module = NULL;
|
||||
|
||||
for_each(_modules.begin(), _modules.end(), ptr_fun(operator delete));
|
||||
for_each(_modules.begin(), _modules.end(),
|
||||
memory::deletor<Module>());
|
||||
_modules.clear();
|
||||
|
||||
GlobalPreferences& prefs = GlobalPreferences::get_instance();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue