0

The manual describes the correct way to remove database is :

{
QSqlDatabase db = QSqlDatabase::addDatabase (...);
QSqlQuery query (db);
query.exec (...); 
}

QSqlDatabase::removeDatabase (...);

What happens if I close the database but not remove it explicitly?

Navjot Singh
  • 626
  • 1
  • 5
  • 16
  • I guess, if you simply close a database connection without removing it, you can open it again. If you also remove it, you must add it again and then open. – vahancho Dec 21 '18 at 07:48
  • From the memory perspective, does closing and not removing have concerns around memory leaks? – Navjot Singh Dec 21 '18 at 17:27

0 Answers0