how to free memory for structure variable
<pre><code>typdef struct _structname  
{  
    int x;  
    string y;  
} structure_name;

structure_name variable;
</code></pre>

<p>Now I access <code>variable.x</code> and <code>y</code>. After using it how can i deallocate or free the memory used by <code>variable</code>?</p>

<p>Actually the memory is getting allocated when i am doing <strong>variable.y="sample string"</strong>.So the = operator allocates memory which is causing issue. how can i resolve it now?</p>
