do clear in shared pointer mode

This commit is contained in:
Hamed Masafi 2019-07-02 22:00:29 +04:30
parent 3b39018985
commit 52937cbcb3
1 changed files with 3 additions and 2 deletions

View File

@ -61,9 +61,10 @@ int TableSetBase::save(Database *db, bool cleanUp)
|| t->status() == Table::Modified
|| t->status() == Table::Deleted){
rowsAffected += t->save(db);
#ifndef NUT_SHARED_POINTER
if(cleanUp)
t->deleteLater();
#endif
}
}
@ -76,7 +77,7 @@ int TableSetBase::save(Database *db, bool cleanUp)
void TableSetBase::clearChilds()
{
#ifndef NUT_SHARED_POINTER
foreach (Table *t, data->_childRows)
foreach (Table *t, data->childRows)
t->deleteLater();
#endif
data->childRows.clear();