I'm just writing a small app in which I have function which looks like:
QString askForDir()
{
return QFileDialog::getExistingDirectory(this, "Choose directory", QString(""));
}
Since I've added this function I've mentioned that memory allocation became pretty strange after using this function ( askForDir()
).
I use OS X Instruments app for debugging needs so here's what I've got:
Peaks are the moments when
askForDir()
function works, I mean building dir-tree.
Between these peaks there are spaces where nothing happened, I mean app doing nothing, just waiting for other action from user.
As you can see memory allocation is growing. If you want numbers:
at 30sec - 91 Mb
at 50sec - 113 Mb
at 1m15sec - 135 Mb
Each time it grows at 22 Mb
I've tried to explore it and changed askForDir()
function to smth like this:
QString askForDir()
{
return "/Users/username/Desktop";
}
All I was speaking above disappeared. So, I concluded that the problem is in QFileDialog.
Here's what I'm using:
- OS X 10.9.4
- Xcode 5.1.1, Carbon
- Qt 4.8.6
Has anyone else the same "problem"?