First of all, thank you both for your quick answer. This is really appreciated.

Originally Posted by
fatjuicymole
... but you can be sure it will be freed eventually. ...
Maybe this is my problem.
Right after the use of the QHash, i need to allocate a huge block a continuous memory (I am using CvMat from openCV).
While my virtual memory seems all available (from task manager), I got an "insufficient memory error".
Here a code example :
int nbDim = 375;
int maxPts = 1073741700/nbDim;
CvMat* dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
cvReleaseMat(&dataPts);
testMemory();
dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
cvReleaseMat(&dataPts);
int nbDim = 375;
int maxPts = 1073741700/nbDim;
CvMat* dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
cvReleaseMat(&dataPts);
testMemory();
dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
cvReleaseMat(&dataPts);
To copy to clipboard, switch view to plain text mode
The first cvCreateMat pass while the second popup a error message : "not enough memory".
How can I know that the memory have been released and that I can creat the new matrice ?
Bookmarks