Commit 0fed6739 authored by Volker Krause's avatar Volker Krause
Browse files

Correctly destroy read SHP objects again

parent 8ba3eee2
......@@ -82,7 +82,7 @@ GeoDataDocument *ShpRunner::parseFile(const QString &fileName, DocumentRole role
placemark = new GeoDataPlacemark;
document->append( placemark );
SHPObject *shape = SHPReadObject( handle, i );
std::unique_ptr<SHPObject, decltype(&SHPDestroyObject)> shape(SHPReadObject( handle, i ), &SHPDestroyObject);
if (nameField != -1) {
const char* info = DBFReadStringAttribute( dbfhandle, i, nameField );
// TODO: defaults to utf-8 encoding, but could be also something else, optionally noted in a .cpg file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment