how to delete object defined in header file and used in .cpp file
<p>i have one header file (one.h) in which i have defined </p>

<pre><code> coral::AttributeList* m_inputData;
</code></pre>

<p>where AttributeList is a class and coral is a namespace</p>

<p>and in another file (one.cpp) i have some expression like</p>

<pre><code> if ( ! m_inputData )
m_inputData = new coral::AttributeList;
</code></pre>

<p>Plz tell me how to delete this memory and how to use smart pointer in this case.
Thanks in Advance!!</p>
