title: Free memory in c++ (armadillo)
body: <p>I want to free memory after using an object ('ii', in the following program) in c++:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;armadillo&gt;
  
  using namespace std;
  using namespace arma;
  
  int main()
  {
      cx_mat ii(2,2,fill::eye);
      cout &lt;&lt; ii &lt;&lt;endl;
      free (ii);
      return 0;
  }
  </code></pre>
  
  <p>But after compiling, I encounter to the following error:</p>
  
  <pre><code>error: cannot convert ‘arma::cx_mat {aka arma::Mat&lt;std::complex&lt;double&gt; &gt;}’ to ‘void*’ for argument ‘1’ to ‘void free(void*)’
  </code></pre>
  
  <p>can any body guide me?</p>