| 719 | |
| 720 | SC::PluginDynamicLibrary::PluginDynamicLibrary() : lastLoadTime(PluginNow()) { numReloads = 0; } |
| 721 | SC::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 | |
| 745 | SC::Result SC::PluginSysroot::findBestSysroot(PluginCompiler::Type compilerType, PluginSysroot& sysroot) |
| 746 | { |