Hi,
We enable on our app the use of cache for the maps views, so we are using the following code to activate this option:
ArcGISEnvironment.urlSession = ArcGISURLSession {
let defaultConfig = URLSessionConfiguration.default
defaultConfig.requestCachePolicy = .returnCacheDataElseLoad
return defaultConfig
}
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:
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?
Thanks,
> we noticed that this configuration causes a memory leak each time the map is loaded.
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?
Hi @RyanOlson1 This occurs each time a screen with the map is loaded, which means it can happen multiple times during a single run.
Why do you need to set the URLSession every time a map is loaded?
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.
Hi @ByronAndres,
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.
Sure, I'll send you a direct message with the code where we reproduce this memory leak.
Thanks,