How to write a copy constructor for a class with std::vector<unsigned char*> member variable
<p>Is simple assignement of the member vectors enough?</p>

<pre><code>class WidgetNames
{
    WidgetNames(int sz)
    {
        unsigned char* c = new unsigned char[ sz ];
        memset(c,0,sz);
        m_names.push_back( c );
            m_len.push_back(sz);
    }
    ~WidgetNames()
    {
        for ( size_t i = 0 ; i &lt; m_names.size() ; ++i )
        {
            if( m_names[i] != NULL )
            {
                delete [] m_names[i];
            }
        }   
    }
    WidgetNames(const WidgetNames &amp;other)
    {
        m_names = other.m_names;
    }
    std::vector&lt;unsigned char*&gt; m_names;
    std::vector&lt;int&gt; m_len;
};
</code></pre>

<p>I am getting a crach in my destructor which makes me suspicious that the copy constructor might be the culprit. Or may be my problem is elsewhere <br><br>
EDIT<br>
Added length of the buffers. This is not the complete class def I just wanted to provide sufficient info to solicit help.<br>
No, I can't use std:: string because I want to share the member vector with a c functions that can write to the buffers</p>
