Skip to content

Conversation

@Maxd646
Copy link
Collaborator

@Maxd646 Maxd646 commented May 12, 2025

adding : db = nullptr; in the void closeDatabase() to Prevent dangling pointer like in the below

void closeDatabase() {
if (db) {
sqlite3_close(db); // Close the SQLite database connection
db = nullptr; // Prevent dangling pointer
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants