MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / destroy

Method destroy

libs/module/CoreModule.cpp:75–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void CoreModule::destroy()
76{
77 if (_instance)
78 {
79 assert(_coreModuleLibrary);
80
81 auto symbol = _coreModuleLibrary->findSymbol(QUOTE(SYMBOL_DESTROY_RADIANT));
82
83 if (symbol == nullptr)
84 {
85 throw FailureException("Main module " + _coreModuleLibrary->getName() +
86 " doesn't expose the symbol " + QUOTE(SYMBOL_DESTROY_RADIANT));
87 }
88
89 auto destroyFunc = reinterpret_cast<DestroyRadiantFunc>(symbol);
90
91 destroyFunc(_instance);
92 _instance = nullptr;
93 }
94}
95
96}

Callers

nothing calls this directly

Calls 3

findSymbolMethod · 0.80
FailureExceptionClass · 0.70
getNameMethod · 0.45

Tested by

no test coverage detected