Good day,
From documentation it's unclear when "ResultSet* Statement::executeQuery" function's returned ResultSet should be deleted. For example, should ResultSet be deleted after every executeQuery call?
sql::Statement* stmt = 0;
sql::ResultSet* res = 0;
// ...
for (unsigned short i = 0; i < 50; i++)
{
res = stmt->executeQuery("SELECT * FROM table1;");
while (res->next())
{
// ...
}
delete res;
res = 0;
}
From documentation it's unclear when "ResultSet* Statement::executeQuery" function's returned ResultSet should be deleted. For example, should ResultSet be deleted after every executeQuery call?
sql::Statement* stmt = 0;
sql::ResultSet* res = 0;
// ...
for (unsigned short i = 0; i < 50; i++)
{
res = stmt->executeQuery("SELECT * FROM table1;");
while (res->next())
{
// ...
}
delete res;
res = 0;
}