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

Quote Originally Posted by fatjuicymole View Post
... 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 :

Qt Code:
  1. int nbDim = 375;
  2. int maxPts = 1073741700/nbDim;
  3. CvMat* dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
  4. cvReleaseMat(&dataPts);
  5.  
  6. testMemory();
  7.  
  8. dataPts = cvCreateMat( maxPts , nbDim, CV_8U );
  9. 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 ?