/[svn]/linuxsampler/trunk/src/plugins/InstrumentEditorFactory.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/plugins/InstrumentEditorFactory.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4020 by schoenebeck, Thu Dec 23 15:26:02 2021 UTC revision 4021 by schoenebeck, Wed Jan 5 16:11:04 2022 UTC
# Line 290  namespace LinuxSampler { Line 290  namespace LinuxSampler {
290          return true;          return true;
291      }      }
292    
293        //NOTE: method currently not used at all, see FIXME comment below why
294      void InstrumentEditorFactory::ClosePlugins() {      void InstrumentEditorFactory::ClosePlugins() {
295          if (LoadedDLLs.size()) {          if (LoadedDLLs.size()) {
296              dmsg(1,("Unloading instrument editor plugins..."));              dmsg(1,("Unloading instrument editor plugins..."));
297              // free all inner factories              // free all inner factories
298              {              {
299                    //FIXME: potential race with 'InnerFactoryRegistrator'
300                    // destructor, the latter is executed deferred when the DLL is
301                    // eventually unloaded by the OS, and that in turn seems to have
302                    // created a race when this method was called in the past on
303                    // LSCP "RESET" command, leading to the situation that plugins
304                    // were not available as bPluginsLoaded ended up true due to
305                    // LoadPlugins() call while the subsequent deferred destructor
306                    // removed the plugin instances without resetting bPluginsLoaded
307                    // https://sourceforge.net/p/linuxsampler/mailman/message/37411956/
308                  std::map<String, InnerFactory*>::iterator iter = InnerFactories.begin();                  std::map<String, InnerFactory*>::iterator iter = InnerFactories.begin();
309                  for (; iter != InnerFactories.end(); iter++) delete iter->second;                  for (; iter != InnerFactories.end(); iter++) delete iter->second;
310                  InnerFactories.clear();                  InnerFactories.clear();

Legend:
Removed from v.4020  
changed lines
  Added in v.4021

  ViewVC Help
Powered by ViewVC