[gdal-dev] How to destroy/free VSIMEM in C++

Even Rouault even.rouault at spatialys.com
Tue Jul 21 06:21:58 PDT 2020


On mardi 21 juillet 2020 04:19:54 CEST MRRAJESH wrote:
> Developers,
> Below is the GDALVectorTranslate C++ code. I am clearing the vsibuf with
> VSIUnlink. But still memory is not vanished. Do we need to call any other
> methods?

I suspect you use the MVT driver here ? In which case it will output a hierarchy 
of files. VSIUnlink() just removes one single file, which is not appropriate then. 
Use VSIRmdirRecursive() instead

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200721/c4a1c8b1/attachment.html>


More information about the gdal-dev mailing list