I successfully add and remove image layers from the Map, however I need to be able to "unlock" the relative file on my system in order to (e. g.) remove or rename it.
Everything works fine if I use image layers using the GDAL driver (e. g. *.tif), however image layers that uses MBTILES are removed from the map but I cannot remove the file from disk until I close the whole application (which is not desired).
In the above link I read that in an older version of osgEarth the problem was that the sqlite database was not closed. However it seems to me that the database is not closed even in the most recent 3.1 version.
How can I unlock the *.mbtiles file after removing the corresponding layer from the map?
I'm using osgEarth 2.10.1 built with MSVC2015 x64.
I've implemented a very little patch that seems to work (at least in my application). Since I'm using version 2.10.1 I've modified the class MBTILESTileSource by adding an explicit destructor in the header. Inside the destructor i simply call the method
From an initial set of tests on my application it seems that with this patch the MBTILES files are unlocked after these have been removed from the map.