title: Not freeing memory in a C array
body: <p>This C code (compiled as C++) is not freeing memory. The program starts out with 992kB on the 'new' line, then after allocating memory, it goes to 10MB. After freeing the memory, it only goes down to 3MB. Even doing a delete[] doesn't erase the memory. What am I doing wrong?</p>
  
  <pre><code>INT iSize=8192;
  
  struct sUsernameA
  {
  TCHAR *sUsername;
  };
  
  sUsernameA *sArr = new sUsernameA[iSize]();
  
  for (INT i=0;i&lt;iSize;i++)
  {
  sArr[i].sUsername = (TCHAR*)calloc(512,sizeof(TCHAR));
  }
  
  
  for (INT i=0;i&lt;iSize;i++)
  {
  free(sArr[i].sUsername);sArr[i].sUsername = NULL;
  }
  
  delete [] sArr;
  </code></pre>