AnsweredAssumed Answered

Release File After MobileMapPackage OpenAsync

Question asked by on Aug 9, 2018
Latest reply on Aug 29, 2018 by MStoica-esristaff

I am using ArcGIS Runtime SDK 100.3 in UWP. I am using it to open a mobile map package, i.e. Esri.ArcGISRuntime.Mapping.MobileMapPackage.OpenAsync


There doesn't seem to be a way to delete the file once it goes out of scope. So, if I open it, load the map, display the map, remove the map, return from the method that used it (variables out of scope), then try to delete the file that was just used, I get a "file in use" exception. The map is completely out of scope, no layers are being used anywhere.


Is there a way to force the MobileMapPackage class to release the handle it has on a file without having to close the entire application? Sometimes we pull an mmpk into our application space for temporary use, open it, and then need to clean it up. To be clear, I am not looking to close the file while the map/layers are still in use/accessing local data.