<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Memory consumption using OfflineMapTask in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092673#M10381</link>
    <description>&lt;P&gt;Hi Eric&lt;BR /&gt;Did you manage to fix this issue?&lt;BR /&gt;If so, can you please share details?&lt;BR /&gt;We are stuck on this at the moment.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 26 Aug 2021 13:42:00 GMT</pubDate>
    <dc:creator>KrishnaShinde</dc:creator>
    <dc:date>2021-08-26T13:42:00Z</dc:date>
    <item>
      <title>Memory consumption using OfflineMapTask</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1026207#M9789</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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...&lt;/P&gt;&lt;P&gt;Each time I am calling the&amp;nbsp;&amp;nbsp;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...&lt;/P&gt;&lt;P&gt;And after a while, the apps breaks with an Out Of Memory error.&lt;/P&gt;&lt;P&gt;Can you tell me hao I can free the memory consumed by the OfflineMapTask.CreateAsync method ?&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Eric.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:08:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1026207#M9789</guid>
      <dc:creator>ERICDUCOS</dc:creator>
      <dc:date>2021-02-12T11:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Memory consumption using OfflineMapTask</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092673#M10381</link>
      <description>&lt;P&gt;Hi Eric&lt;BR /&gt;Did you manage to fix this issue?&lt;BR /&gt;If so, can you please share details?&lt;BR /&gt;We are stuck on this at the moment.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 13:42:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092673#M10381</guid>
      <dc:creator>KrishnaShinde</dc:creator>
      <dc:date>2021-08-26T13:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Memory consumption using OfflineMapTask</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092713#M10383</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes, I found a fix just by calling only one time the CreateAsync methode and keep the result object of type OfflineMapTask in cache. So each time I call the server, I reuse the same OfflineMapTask to query server if any OfflineMap is available.&lt;/P&gt;&lt;P&gt;I got an answer of ESRI technical team that they could not reproduce the problem...but it seem that I am not alone having such a problem !!&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 15:02:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092713#M10383</guid>
      <dc:creator>EricDUCOS1</dc:creator>
      <dc:date>2021-08-26T15:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Memory consumption using OfflineMapTask</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092723#M10384</link>
      <description>&lt;P&gt;Thanks Eric.&lt;BR /&gt;&lt;BR /&gt;We are working with an already existing map file on our device. We are using below code to load the map.&lt;BR /&gt;In doing so, I think the "&lt;SPAN&gt;tilecache&lt;/SPAN&gt;" and "&lt;SPAN&gt;vectorTiledLayer&lt;/SPAN&gt;" objects are not disposed from the memory. Do you know any other way of loading the offline maps?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var mapPackageFolder = Constants.TpkFolderLocation;
var mapPackageFile = @"Tas_WebM_BaseMap_no_contour.vtpk";

var mapPackagePath = System.IO.Path.Combine(mapPackageFolder, mapPackageFile);

var tileCache = new VectorTileCache(mapPackagePath);

ArcGISVectorTiledLayer vectorTiledLayer = new ArcGISVectorTiledLayer(tileCache);

map = new Map(new Basemap(vectorTiledLayer));

// Create starting viewpoint
Viewpoint startingViewpoint = new Viewpoint(
-42.882317, 147.327125,
10000);

map.InitialViewpoint = startingViewpoint;

return map;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 15:19:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/memory-consumption-using-offlinemaptask/m-p/1092723#M10384</guid>
      <dc:creator>KrishnaShinde</dc:creator>
      <dc:date>2021-08-26T15:19:52Z</dc:date>
    </item>
  </channel>
</rss>

