<?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: Possible memory leak with Dictionary Renderer and very dynamic attributes in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1706801#M5549</link>
    <description>&lt;P&gt;I ran some tests over the weekend: It seems that memory consumption is relatively stable after a while. Could someone from ESRI confirm that memory consumption for symbols grows only to a certain level and then remains stable? For our use case this is very important as our applications tend to run for days without restart. Many thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jun 2026 11:05:53 GMT</pubDate>
    <dc:creator>imbachb</dc:creator>
    <dc:date>2026-06-08T11:05:53Z</dc:date>
    <item>
      <title>Possible memory leak with Dictionary Renderer and very dynamic attributes</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1706484#M5547</link>
      <description>&lt;P&gt;A while ago I've reported following issue&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1664928#M5523" target="_blank" rel="noopener"&gt;Solved: Possible memory leak with Dictionary Renderer and ... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;for which a fix was released in ArcGIS SDK for Qt v200.8.2 and v.300.0.0.&lt;/P&gt;&lt;P&gt;&amp;gt; BUG-000181142: Memory leak with DictionaryRenderer and very dynamic attributes.&lt;/P&gt;&lt;P&gt;However, with both of these version we still experience the same issue.&lt;/P&gt;&lt;P&gt;Working set of the process is steadily increasing:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="imbachb_3-1780659211689.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/153477iABA796EA05FC799F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="imbachb_3-1780659211689.png" alt="imbachb_3-1780659211689.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Allocations do not seem to get deleted from the function `esri::cim_rule_engine::Style_parser::get_symbol_keys`&lt;/P&gt;&lt;P&gt;ArcGIS SDK v200.8.2&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="imbachb_2-1780658680854.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/153476i7A4FA23F50CE0C07/image-size/large?v=v2&amp;amp;px=999" role="button" title="imbachb_2-1780658680854.png" alt="imbachb_2-1780658680854.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;ArcGIS SDK v300.0.0&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="imbachb_1-1780658660866.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/153475iDBFA970F4F97F9EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="imbachb_1-1780658660866.png" alt="imbachb_1-1780658660866.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is a cache of symbols being built? How large can we expect this cache to grow?&lt;/P&gt;&lt;P&gt;Please find attached a source code example. The example code does following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Add a dictionary renderer using the app-6e stylx.&lt;/LI&gt;&lt;LI&gt;Add 200 graphics at random positions&lt;/LI&gt;&lt;LI&gt;Update attributes of all graphics on a timer&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This function creates a timer which loops over all graphics and sets random attributes on each graphic, causing the leak.&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;namespace
{
const std::vector&amp;lt;std::string&amp;gt; identifications{"0", "1", "2", "3", "4", "5"};
std::uniform_int_distribution&amp;lt;std::size_t&amp;gt; identification_distribution{0, identifications.size() - 1};
const std::vector&amp;lt;std::string&amp;gt; mainIcons{
	"000000",
	"110000",
	"110100",
	"110101",
	"110102",
	"110103",
	"110104",
	"110105",
	"110107",
	"110116",
	"110200"};
std::uniform_int_distribution&amp;lt;std::size_t&amp;gt; mainIcon_distribution{0, mainIcons.size() - 1};
std::uniform_int_distribution&amp;lt;std::size_t&amp;gt; azimuth_distribution{0, 360};
const std::vector&amp;lt;std::string&amp;gt; modifiers{"00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10"};
std::uniform_int_distribution&amp;lt;std::size_t&amp;gt; modifiers_distribution{0, modifiers.size() - 1};

} // namespace

void
CustomDictionaryRenderer::drawSymbols()
{
	for (size_t i = 0; i &amp;lt; 200; i++) {
		auto geom = Point(8.5417, 47.3769, m_spatialReference);
		QVariantMap attributes;
		attributes["sidc"] = "1400010000110102000000";
		Graphic* graphic = new Graphic(geom, attributes, this);
		m_graphicsOverlay-&amp;gt;graphics()-&amp;gt;append(graphic);
	}

	QTimer* timer = new QTimer(this);
	connect(timer, &amp;amp;QTimer::timeout, this, [this] {
		for (auto graphic : *m_graphicsOverlay-&amp;gt;graphics()) {
			QVariantMap attributes;
			auto identification = identifications[identification_distribution(m_generator)];
			auto mainIcon = mainIcons[mainIcon_distribution(m_generator)];
			auto sidc = "140" + identification + "010000" + mainIcon + "000000";
			attributes["sidc"] = QString::fromStdString(sidc);
			auto randomX = 8.5417 + (9.2417 - 8.5417) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX;
			auto randomY = 47.3769 + (46.3769 - 47.3769) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX;
			attributes["direction"] =
				QString::number(180.0 + (-180.0 - 180.0) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX);
			attributes["speed"] = QString::number(10000.0 + (0.0 - 10000.0) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX);
			attributes["staffcomment"] =
				QString::number(10000.0 + (0.0 - 10000.0) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX);
			attributes["uniquedesignation"] =
				QString::number(10000.0 + (0.0 - 10000.0) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX);
			attributes["additionalinformation"] =
				QString::number(10000.0 + (0.0 - 10000.0) * static_cast&amp;lt;double&amp;gt;(rand()) / RAND_MAX);
			auto point = Point(randomX, randomY, m_spatialReference);
			graphic-&amp;gt;attributes()-&amp;gt;setAttributesMap(attributes);
			graphic-&amp;gt;setGeometry(point);
		}
	});
	timer-&amp;gt;start(100);
}&lt;/LI-CODE&gt;&lt;P&gt;We are using Windows 10, ArcGIS Maps SDK for Qt 200.8.2 / 300.0.0, and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;DirectX&amp;nbsp;&lt;/SPAN&gt;rendering API.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2026 11:03:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1706484#M5547</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2026-06-08T11:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Possible memory leak with Dictionary Renderer and very dynamic attributes</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1706801#M5549</link>
      <description>&lt;P&gt;I ran some tests over the weekend: It seems that memory consumption is relatively stable after a while. Could someone from ESRI confirm that memory consumption for symbols grows only to a certain level and then remains stable? For our use case this is very important as our applications tend to run for days without restart. Many thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jun 2026 11:05:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/possible-memory-leak-with-dictionary-renderer-and/m-p/1706801#M5549</guid>
      <dc:creator>imbachb</dc:creator>
      <dc:date>2026-06-08T11:05:53Z</dc:date>
    </item>
  </channel>
</rss>

