<?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 Leak when update ArcGISURLSession in Swift Maps SDK Questions</title>
    <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1579677#M498</link>
    <description>&lt;P&gt;Sure, I'll send you a direct message with the code where we reproduce this memory leak.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jan 2025 20:01:58 GMT</pubDate>
    <dc:creator>ByronAndres</dc:creator>
    <dc:date>2025-01-28T20:01:58Z</dc:date>
    <item>
      <title>Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577264#M485</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We enable on our app the use of cache for the maps views, so we are using the following code to activate this option:&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;        ArcGISEnvironment.urlSession = ArcGISURLSession {
            let defaultConfig = URLSessionConfiguration.default
            defaultConfig.requestCachePolicy = .returnCacheDataElseLoad
            return defaultConfig
        }&lt;/LI-CODE&gt;&lt;P&gt;While analyzing the app in Profile mode on Xcode, we noticed that this configuration causes a memory leak each time the map is loaded. Below is the error displayed in the Xcode Profile:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-01-20 at 11.54.44 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123630i3BEE04591009C24A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-01-20 at 11.54.44 AM.png" alt="Screenshot 2025-01-20 at 11.54.44 AM.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-01-20 at 11.52.20 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/123631iA2E8241A9BFE2DB7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-01-20 at 11.52.20 AM.png" alt="Screenshot 2025-01-20 at 11.52.20 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;We would like to confirm with you whether this is the correct way to set up the cache configuration. Additionally, do you have any insights into what might be causing the issue with the map when it loads for the first time?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 17:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577264#M485</guid>
      <dc:creator>ByronAndres</dc:creator>
      <dc:date>2025-01-20T17:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577483#M487</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;we noticed that this configuration causes a memory leak each time the map is loaded.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Does this occur more than once per run of your app? If so, how much memory is leaked in a typical run of the app?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 17:50:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577483#M487</guid>
      <dc:creator>RyanOlson1</dc:creator>
      <dc:date>2025-01-21T17:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577653#M489</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/232346"&gt;@RyanOlson1&lt;/a&gt; This occurs each time a screen with the map is loaded, which means it can happen multiple times during a single run.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 23:36:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577653#M489</guid>
      <dc:creator>ByronAndres</dc:creator>
      <dc:date>2025-01-21T23:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577660#M490</link>
      <description>&lt;P&gt;Why do you need to set the URLSession every time a map is loaded?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 23:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577660#M490</guid>
      <dc:creator>RyanOlson1</dc:creator>
      <dc:date>2025-01-21T23:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577951#M492</link>
      <description>&lt;P&gt;Apologies for not explaining the issue clearly. We only set up the URLSession once, but we observe a memory leak every time we open the map.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 19:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1577951#M492</guid>
      <dc:creator>ByronAndres</dc:creator>
      <dc:date>2025-01-22T19:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1578870#M494</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/750302"&gt;@ByronAndres&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;Can you include a minimum reproducible example via a code snippet or project that sets the ArcGISEnvironment.urlSession configuration and loads a map? I am able to reproduce the memory leak.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2025 22:39:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1578870#M494</guid>
      <dc:creator>Destiny_Hochhalter</dc:creator>
      <dc:date>2025-01-24T22:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: Memory Leak when update ArcGISURLSession</title>
      <link>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1579677#M498</link>
      <description>&lt;P&gt;Sure, I'll send you a direct message with the code where we reproduce this memory leak.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2025 20:01:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/swift-maps-sdk-questions/memory-leak-when-update-arcgisurlsession/m-p/1579677#M498</guid>
      <dc:creator>ByronAndres</dc:creator>
      <dc:date>2025-01-28T20:01:58Z</dc:date>
    </item>
  </channel>
</rss>

