MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / lbug_database_destroy

Function lbug_database_destroy

src/c_api/database.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void lbug_database_destroy(lbug_database* database) {
33 if (database == nullptr) {
34 return;
35 }
36 std::atomic_ref<void*> atomic_db(database->_database);
37 void* ptr = atomic_db.exchange(nullptr);
38 if (ptr != nullptr) {
39 delete static_cast<Database*>(ptr);
40 }
41}
42
43lbug_system_config lbug_default_system_config() {
44 SystemConfig config = SystemConfig();

Callers 4

TEST_FFunction · 0.85
TEST_FFunction · 0.85
TearDownMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.68
TEST_FFunction · 0.68
TearDownMethod · 0.68