title: Debug Assertion Failed: _CrtIsValidHeapPointer(block)
body: <p>I wrote a code that simulates a matrix.
  this matrix has a pointer to pointer and actually its an array of linked list. i have two of those - one for the rows and the second for the column.
  each array index its the matrix row/col first place, and the list is the rest number in the rox/col.</p>
  
  <p>I can send the code, but its not short.</p>
  
  <p>My problem is that after im doing some actions, and im trying to delete the matrix at the end - it pop me this Failed problem.
  I have tryed to change my code and I found that the problem is here:</p>
  
  <pre><code>delete this-&gt;rowsArray;
  this-&gt;rowsArray = newRowArray; -&gt;here
  
  
  delete this-&gt;colsArray;
  this-&gt;colsArray = newColArray; -&gt;here
  </code></pre>
  
  <p>rowsArray ad colsArray initilized like that:</p>
  
  <p><code>rowsArray = new matrixNode*[lastRowPlace+1];
  colsArray = new matrixNode*[lastColPlace+1];</code></p>
  
  <p>same about newColsArray and row...
  I hope you would be able to give me an advice cause I really dont know what to do :(</p>
  
  <p>**Just forgot to say that the problem pop just at the destructor...</p>