Return class destructor
<p>I'm a student and I'm learning C++. I quite good at C++ still "simple" things get me entangled. I've recently learn classes, methods, constructor/deconstructor, inheritance, virtual, etc. I have this code : </p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

class test {
    int a, c;
public:
    test() { cout &lt;&lt; "Constructor\n"; }
    test(int a) :a(a) { cout&lt;&lt;"Explicit Constructor\n"; }
    test foo(const test&amp;, const test&amp;);
    ~test() { cout &lt;&lt; "DECONSTRUCTOR!\n"; }
};

test test::foo(const test &amp;t1, const test &amp;t2) {
    test rez;
    rez.c = t1.a + t2.a;
    return rez;
}

void main() {
    test t1(5), t2(21), rez;
    rez.foo(t1, t2);
    cin.ignore();
}
</code></pre>

<p>I know that in foo I create a local class that is deleted when out of scope. So when foo is called I should see one constructor and one destructor, but it gives me one more deconstructor, so I have one constructor for two destructors. </p>