How to delete char * in c++?
<p>In my application, I create a <code>char*</code> like this:</p>

<pre><code>class sample
{
    public:
        char *thread;
};

sample::sample()
{
    thread = new char[10];
}

sample::~sample()
{
    delete []thread;
}
</code></pre>

<p>Am I doing the right thing in the code?</p>
