Skip to content
Permalink
Browse files

Explain the handle ownership

  • Loading branch information
elpaso committed Jun 18, 2020
1 parent 9d040bb commit 1763dad1e65921bfcb2e427b1dc7d90b64420cf0
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -5744,6 +5744,9 @@ bool QgsSpatiaLiteProvider::getTableSummaryAbstractInterface( gaiaVectorLayerPtr
lyr->ExtentInfos->MaxX, lyr->ExtentInfos->MaxY );
// This can be wrong! see: GH #29264
// mNumberFeatures = lyr->ExtentInfos->Count;

// Note: the unique ptr here does not own the handle, it is just used for the convenience
// methods available within the class.
sqlite3_database_unique_ptr slPtr;
slPtr.reset( sqliteHandle() );
int resultCode;
@@ -5753,6 +5756,7 @@ bool QgsSpatiaLiteProvider::getTableSummaryAbstractInterface( gaiaVectorLayerPtr
stmt.step();
mNumberFeatures = sqlite3_column_int64( stmt.get(), 0 );
}
// Note: the pointer handle is ownd by the provider, releasing it
slPtr.release();
}
else

0 comments on commit 1763dad

Please sign in to comment.
You can’t perform that action at this time.