I have a page which shows maps which have been downloaded to the device. The page shows the name, date and the number of edits in each map. To show the edit count, the Gdb is opened using Geodatabase.OpenAsync.
On this page, the user can choose to open, sync or delete the map.
This works fine on iOS and Android, however on UWP the Geodatabase.OpenAsync creates a lock on the file when the page is loaded, and I can't seem to figure out how to release it so the user can delete the map.
This is unfortunately an known issue at the moment. We are trying to get closing (and releasing the lock) easier in the future releases.
At the moment I would propose a workaround with this which kind of works. I would build UI experience so that it would remove the file but behind the scenes save information to the application that when opening the app next time, remove this data. It's not optimal but that's the best choice that you have.
Another thing that you can try to do is to make sure that all the references (layer etc..) are removed and out of scope and force GC but this might be hard to get right.