MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / unload

Method unload

Libraries/Plugin/Plugin.cpp:721–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

719
720SC::PluginDynamicLibrary::PluginDynamicLibrary() : lastLoadTime(PluginNow()) { numReloads = 0; }
721SC::Result SC::PluginDynamicLibrary::unload(bool releaseDebuggerFiles)
722{
723 SC_TRY(dynamicLibrary.close());
724#if SC_PLATFORM_WINDOWS
725 if (releaseDebuggerFiles and Debugger::isDebuggerConnected())
726 {
727 StringPath pdbFile;
728 SC_TRY(definition.getDynamicLibraryPDBAbsolutePath(pdbFile));
729 if (PluginFileSystem::existsAndIsFileAbsolute(pdbFile.view()))
730 {
731 SC_TRY(Debugger::unlockFileFromAllProcesses(pdbFile.view()));
732 SC_TRY(Debugger::deleteForcefullyUnlockedFile(pdbFile.view()));
733 }
734 }
735#else
736 (void)releaseDebuggerFiles;
737#endif
738 pluginInit = nullptr;
739 pluginClose = nullptr;
740
741 pluginQueryInterface = nullptr;
742 return Result(true);
743}
744
745SC::Result SC::PluginSysroot::findBestSysroot(PluginCompiler::Type compilerType, PluginSysroot& sysroot)
746{

Callers 4

ZLibStreamTestMethod · 0.45
unloadPluginMethod · 0.45

Calls 4

ResultClass · 0.50
closeMethod · 0.45
viewMethod · 0.45

Tested by 3

ZLibStreamTestMethod · 0.36