I have a container like QMap<float, QList<QPair<float,float> *> *> *data, but I can't delete it.
How to solve this problem?
My code :
{
QMapIterator<float, QList<QPair<float,float> *> *> iterator(*data);
while(iterator.hasNext()) {
iterator.next();
QList<QPair<float,float> *> *timeValues = iterator.value();
qDeleteAll(*timeValues);
timeValues->clear();
}
qDeleteAll(*data);
data->clear();
delete data;
data = NULL;
}
but it doesn't work, at least the memory is not given back to OS immediately.
Bookmarks