POST
|
Hi, thanks for your reply... When you told me to kill the object using that package, I did see how...and then I had an idea: Before I had copied th code from sample of ESRI like that. I was initializing the Map in Initialize function called in constructor of my Page class: MobileMapPackage package = await MobileMapPackage.OpenAsync(filepath); await package.LoadAsync(); MyMapView.Map = package.Maps.First(); In the destructor of the page, I just forced the MyMapView.Map to null...but it was not enough. NOW, I moved the package variable as private in my page class, and used the private variable in the destructor adding that: MyMapView.Map = null; package.Close(); package = null; The Close call seem to get all the things happy...now I can deleted and replace my files
... View more
03-01-2021
12:55 PM
|
1
|
0
|
942
|
POST
|
Hi, I have written a simple Xamarin Forms App with two pages. The first page is the main page, the second one is a page with a MapView control that displays an Offline Map package. All is working good. I can navigate between the two page in replacing the MainPage value of the Xamarin application. The problem is the following one: On WIndows platform, when I goes the first time on the map page and come back to the main page, the map page being no more used is supposed to be released and ressources free...BUT, if I try to move or delete locally the package (simulating for exemple an update coming from the server)...I cannot because the files are locked, whereas they are no more used (I am on the main page). On Android, there is no problem...I can do whatever I want with the files of the package when I am on the main page. How can I free ressource used and kept internally by he runtime so that I can update the package from the main page ! Regards.
... View more
03-01-2021
10:06 AM
|
0
|
2
|
1065
|
POST
|
Hi, I have a piece of code in my Xamarin Forms apps that performs a test to know if a new Prepared Offline map is available. The code is a background task that run a loop and perform the query every X minutes... Each time I am calling the OfflineMapTask.CreateAsync to get the OfflineMapTask object, it consumes about 10 Mo memory and this memory is not released even when forcing Garbage Collection with GC.Collect()...There is no Dispose method... And after a while, the apps breaks with an Out Of Memory error. Can you tell me hao I can free the memory consumed by the OfflineMapTask.CreateAsync method ? Regards. Eric.
... View more
02-12-2021
03:08 AM
|
0
|
3
|
769
|
POST
|
Euh...je veux bien, mais comment on fait. Je ne trouve nulle part une action m'indiquant de "cloturer ou fermer" la question !!! Eric.
... View more
12-05-2019
03:02 AM
|
0
|
0
|
1193
|
Title | Kudos | Posted |
---|---|---|
1 | 03-01-2021 12:55 PM |
Online Status |
Offline
|
Date Last Visited |
09-23-2022
12:54 PM
|