MCPcopy Create free account
hub / github.com/e2wugui/zeze / Resource

Method Resource

cxx/utils.cpp:121–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119 }
120 void Resource::close(){ impl->close(impl); }
121 Resource::Resource(Resource& parent, Runnable cleanup) {
122 std::lock_guard<std::mutex> l(parent.impl->mutex);
123 if (!parent.impl->cleanup)
124 throw IllegalStateException();
125 impl.reset(new Impl(parent.impl, cleanup));
126 parent.impl->children.insert(impl);
127 }
128 void Resource::swap(Resource& rhs) { impl.swap(rhs.impl); }
129 Resource::Resource() {}
130 Resource::Resource(const Resource& rhs) : impl(rhs.impl) { }

Callers

nothing calls this directly

Calls 3

resetMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected