File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,25 @@ void SotLoaderBasic::Initialization()
214
214
void SotLoaderBasic::CleanUp ()
215
215
{
216
216
dynamicgraph::PoolStorage::destroy ();
217
+ // We do not destroy the FactoryStorage singleton because the module will not
218
+ // be reloaded at next initialization (because Python C API cannot safely
219
+ // unload a module...).
220
+ // SignalCaster singleton could probably be destroyed.
221
+
222
+ // Load the symbols.
223
+ destroySotExternalInterface_t * destroySot =
224
+ reinterpret_cast <destroySotExternalInterface_t *>
225
+ (reinterpret_cast <long >
226
+ (dlsym (sotRobotControllerLibrary_,
227
+ " destroySotExternalInterface" )));
228
+ const char * dlsym_error = dlerror ();
229
+ if (dlsym_error) {
230
+ std::cerr << " Cannot load symbol destroy: " << dlsym_error << ' \n ' ;
231
+ return ;
232
+ }
233
+
234
+ destroySot (sotController_);
235
+ sotController_ = NULL ;
217
236
218
237
// / Uncount the number of access to this library.
219
238
dlclose (sotRobotControllerLibrary_);
You can’t perform that action at this time.
0 commit comments