Destructor not called when type-casted void pointer to object
<p>Sample</p>

<pre><code>void func(void* data)
{
 CResource* resource = (CResource*)data;
 delete resource; // ~CResource never called.
 resource = NULL;
}
</code></pre>

<p>Kindly help me to figure out this.</p>
