Where is the first destruction come from?
<p>I was trying to practice on the following code:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;

using namespace std;

class A
{
public:
   virtual void f(){cout&lt;&lt;"A"&lt;&lt;endl;}
   virtual ~A(){cout&lt;&lt;"destruct A"&lt;&lt;endl;}
};

int main()
{
   A o1,o2;
   vector &lt;A &gt; O;
   O.push_back(o1);
   cout&lt;&lt;"1"&lt;&lt;endl;
   O.push_back(o2);

cout&lt;&lt;"test"&lt;&lt;endl;
return 0;
}
</code></pre>

<p>The results turned out to be:</p>

<pre><code>1
destruct A
test
destruct A
destruct A
destruct A
destruct A
</code></pre>

<p>Get confused about where the first destructor comes from.</p>
