Topic: High memory consumption (leading to Out Of Memory)
Hello!
Online Maps seems to keep increasing the number of textures, eventually leading to Out Of Memory errors on mobile (tested on multiple Android devices). Unity's profiler shows an increasing number of textures which seems to be the cause of high memory usage. Inspecting the OnlineMapsCache component also reveals that the memory cache increases above its maximum size (it starts by trimming memory properly but after some time it just increases indefinitely).
Other info:
* Memory increases whenever the map is moved, and increases more dramatically when moving to areas that have not been visited before (probably non-cached areas)
* I have a relatively large number of markers on the scene that are constantly added and removed but they are being pooled, reaching a point where no memory allocation is necessary when a marker is added.
* I'm using the control script (found in this forum) that allows smooth zoom on mobile devices.
* Out of Memory seems to occur when the total memory used by the application reaches 1.1GB (on Android, tested on OnePlus X, Samsung Galaxy A5 and Sony Xperia XA)
Online Maps version: 2.5.31.1
Map size (pixels): 2048x2048
Map size (scene): 2048x2048
Memory cache: 10MB (30% unload)
File cache: 30MB (30% unload)
On a side note, is there any particular reason why you're using an array instead of a list to store 3D markers? This causes serious problems (too many allocations) when performing marker addition/removal in great quantities. For this reason, I replaced the implementation to use a List but this was after the memory problem was discovered.