calling destructor of reference?
<p>Here is my example code</p>

<pre><code>    class king
{
public:
    king(int q)
        :queen(q)
    {
    }

    ~king()
    {
        cout &lt;&lt; "king's destructor." &lt;&lt; endl;
    }

    void operator= (const king &amp;k)
    {
        cout &lt;&lt; "king's copy constructor." &lt;&lt; endl;
        queen = k.queen;
    }

private:
    int queen;
};

void refFunc0(king &amp;k)
{
    king &amp;kk = k;
}

void refFunc1(king &amp;k)
{
    king kk = k;
}

void main()
{
    int qqq0 = 55;

    king kkk0(qqq0);
    refFunc0(kkk0);

    cout &lt;&lt; qqq0 &lt;&lt; endl;

    int qqq1 = 66;
    king kkk1(qqq1);
    refFunc1(kkk1);

    cout &lt;&lt; qqq1 &lt;&lt; endl;

    cin.get();
}
</code></pre>

<p>can anyone help explain what happened in above code?
I mean if I pass a reference into a function, will the reference variable call destructor then destroy the original variable passed into the function as reference?</p>
