Hi, so i create some graphics and append them in overlay. When i hit 10000 graphics i delete them all and clear overlay yet the memory is not realeased.
Sample:
Simple::Simple(QObject* parent /* = nullptr */):
QObject(parent),
m_map(new Map(Basemap::imageryWithLabelsVector(this), this))
{
overlay = new GraphicsOverlay(this);
const QString styleLocation = "whatever";
m_dictionarySymbolStyle = DictionarySymbolStyle::createFromFile(styleLocation, this);
overlay->setRenderer(new DictionaryRenderer(m_dictionarySymbolStyle, this));
}
void Simple::addGraphic()
{
Geometry geom;
SpatialReference sr(4326);
geom = Point(0, 0, sr);
QVariantMap symbol;
Graphic *graphic = new Graphic(geom, symbol);
overlay->graphics()->append(graphic);
if (overlay->graphics()->size() >= 10000)
{
qDeleteAll(*overlay->graphics());
overlay->graphics()->clear();
}
}