Why is this considered to be a bad code in c++?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6500313/in-c-why-should-new-be-used-as-little-as-possible">In C++, why should <code>new</code> be used as little as possible?</a>  </p>
</blockquote>



<p>I saw a discussion in the comment of the question below</p>

<p><a href="http://stackoverflow.com/questions/7481968/samsung-bada-development-without-using-pointers">samsung bada development without using pointers</a></p>

<p>and saw someone saying that below line is a bad c++ code. </p>

<pre><code>Person * p = new Person();
</code></pre>

<p>I do not get in general.. I learned c++ in school few years ago, and haven't touched c++ since then, but when I learned c++ in college, I always declared some object like that and deleted sometimes later. In that way, you have control in handling your object even in other functions without losing its scope.</p>

<p>Since I do not have any other experiences in c++ other than from college, I do not know what other people uses it in general.</p>

<p>Why is it considered to be a bad code?</p>

<p>There is another comment on below link (first comment from the question)</p>

<p><a href="http://stackoverflow.com/questions/8063312/why-didnt-bada-require-scoped-ptr">Why didn&#39;t bada require scoped_ptr?</a></p>

<p>saying that playing with ptr is really bad. I do not get it.</p>
