diff options
Diffstat (limited to 'include/module/ModuleLoader.hpp')
-rwxr-xr-x | include/module/ModuleLoader.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/module/ModuleLoader.hpp b/include/module/ModuleLoader.hpp index d3b7d00..02b368e 100755 --- a/include/module/ModuleLoader.hpp +++ b/include/module/ModuleLoader.hpp @@ -79,6 +79,10 @@ class BaseModuleLoader { #endif throw std::runtime_error( "missing module registry" ); } + + if( m.registry->initModule != 0 ) { + m.registry->initModule( ); + } m_modules.insert( std::make_pair( m.registry->name, m ) ); } @@ -88,6 +92,10 @@ class BaseModuleLoader { { for( typename mapType::iterator it = m_modules.begin( ); it != m_modules.end( ); it++ ) { if( (*it).second.handle ) { + if( (*it).second.registry->destroyModule != 0 ) { + (*it).second.registry->destroyModule( ); + } + #ifndef _WIN32 dlclose( (*it).second.handle ); #else |