MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / unregisterModule

Method unregisterModule

include/runtime/storemgr.h:109–119  ·  view source on GitHub ↗

Unregister a named module from this store.

Source from the content-addressed store, hash-verified

107
108 /// Unregister a named module from this store.
109 Expect<void> unregisterModule(std::string_view Name) {
110 std::unique_lock Lock(Mutex);
111 auto Iter = NamedMod.find(Name);
112 if (Iter == NamedMod.cend()) {
113 return Unexpect(ErrCode::Value::UnknownImport);
114 }
115 (const_cast<Instance::ModuleInstance *>(Iter->second))
116 ->unlinkStore(this, Name);
117 NamedMod.erase(Iter);
118 return {};
119 }
120
121 /// Register a named component in this store.
122 Expect<void> registerComponent(const Instance::ComponentInstance *CompInst) {

Calls 4

UnexpectFunction · 0.85
unlinkStoreMethod · 0.80
eraseMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected