mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
Close DB properly
This commit is contained in:
parent
889fc985c4
commit
3e855cbdac
@ -49,6 +49,10 @@ void Database::open() {
|
||||
std::cout << message << std::endl;
|
||||
}
|
||||
|
||||
void Database::close() {
|
||||
sqlite3_close(db);
|
||||
}
|
||||
|
||||
void Database::createTables() {
|
||||
|
||||
char* errMsg = 0;
|
||||
|
@ -45,6 +45,7 @@ namespace Database {
|
||||
#pragma endregion DatabaseStructs
|
||||
|
||||
void open();
|
||||
void close();
|
||||
void createTables();
|
||||
int getTableSize(std::string tableName);
|
||||
|
||||
|
@ -49,6 +49,7 @@ void terminate(int arg) {
|
||||
if (shardServer != nullptr && shardThread != nullptr)
|
||||
shardServer->kill();
|
||||
|
||||
Database::close();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user