Deleting a pointer to the list of pointers
<p>I create a class, which creates a new list of pointers to objects:</p>

<pre><code>FeatureSet::FeatureSet() {
    this-&gt;featuresList = new list&lt;HaarFeature*&gt;;
    globalCounter = 0;
}
</code></pre>

<p>Now I would like to delete all object from the list, and then delete the pointer to the list. My code is:</p>

<pre><code>FeatureSet::~FeatureSet() {
    for (list&lt;HaarFeature*&gt;::iterator it = featuresList-&gt;begin(); it !=     featuresList-&gt;end(); it++) {
        delete *it;
    }
    delete featuresList; // this take a long time (more than half a minute)
}
</code></pre>

<p>My question is what is the best method to solve this problem? Does my approach is correct? Unfortunately, currently the last operation (deleting a pointer to the list) takes about half minute. List has about 250000 objects.</p>
