| 30 | } |
| 31 | |
| 32 | void 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 | |
| 43 | lbug_system_config lbug_default_system_config() { |
| 44 | SystemConfig config = SystemConfig(); |