QCustomPlot Discussion and Comments

Does erase() free the memoryReturn to overview

In code below, does the erase() free the memory? I have code that uses that principle to delete large amounts of points after certain conditions. After iterating through and erasing bunch of points, the count() returns what I expect and if I iterate through the graph plot now, the expected points have been deleted so looks like the logic worked. ... but I see no increase in free memory, not in /proc/meminfo (freemem+buffers+cached) anyway.
void deleteTest(QCPGraph* graph)
{
QCPDataMap *dataMap;
if (!graph)
{
return;
}

if (!graph->data())
{
return;
}

dataMap = graph->data();
QMap<double, QCPData>::iterator it = dataMap->begin();
while (it != dataMap->end()) {
if (some condition) {
it = dataMap->erase(it); // this increments "it" automatically
}
else
++it;
}
}

Using ARM with Qt 5.3.2 ... looks like the erase() calls deleteNode(n) so guess question is does that free memory !

See my answer here:
http://www.qcustomplot.com/index.php/support/forum/1158

In short: What you're observing is likely just the regular C++ compiler's memory management.