title: Memory allocation in C++ without the 'new' keyword
body: <p>I have some code generated by <a href="http://www.mathworks.se/products/matlab-coder/" rel="nofollow">MATLAB Coder</a>. It includes some variables definitions of this type:</p>
  
  <pre><code>int tmp_size[400];
  </code></pre>
  
  <p>These variables are not explicitly deleted before the end of the method scope.</p>
  
  <p>Are the variables allocated on the heap or the stack? Is this equivalent to the following? </p>
  
  <pre><code>int* tmp_size = new int[400];
  </code></pre>
  
  <p>Would it be best for memory management purposes to rewrite these variables definitions with <code>new</code>, like <code>int* tmp_size = new int[400];</code>?</p>
  
  <p>I notice that memory is allocated by my program, which is never deallocated. Can this be responsible for memory leaks?</p>