MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / destroy

Method destroy

src/yvalve/PluginManager.cpp:673–699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671 GlobalPtr<PluginsMap> plugins;
672
673 void ConfiguredPlugin::destroy()
674 {
675 // plugins->mutex must be entered by current thread
676
677#ifdef DEV_BUILD
678 if (!plugins->mutex.tryEnter(FB_FUNCTION))
679 fb_assert(false);
680 plugins->mutex.leave();
681#endif
682 if (!destroyingPluginsMap)
683 {
684 plugins->remove(MapKey(module->getPlugin(regPlugin).type, plugName));
685 }
686
687 fb_assert(!plugins->wakeIt);
688 if (module != builtin)
689 {
690 unsigned int type = module->getPlugin(regPlugin).type;
691 if (--(byTypeCounters->get(type).counter) == 0)
692 {
693 plugins->wakeIt = byTypeCounters->get(type).waitsOn;
694 }
695 }
696#ifdef DEBUG_PLUGINS
697 fprintf(stderr, "~ConfiguredPlugin %s type %d\n", plugName.c_str(), module->getPlugin(regPlugin).type);
698#endif
699 }
700
701 typedef HalfStaticArray<ConfiguredPlugin*, 16> DelayedDelete;
702 static GlobalPtr<DelayedDelete> delayedDelete;

Callers

nothing calls this directly

Calls 7

MapKeyClass · 0.85
tryEnterMethod · 0.45
leaveMethod · 0.45
removeMethod · 0.45
getPluginMethod · 0.45
getMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected