Polymorphism: Difference between revisions

Content added Content deleted
Line 60: Line 60:
if(pthis && *pthis)
if(pthis && *pthis)
{
{
pthis->dtor();
(*pthis)->dtor();
free(*pthis); *pthis = NULL;
free(*pthis); *pthis = NULL;
}
}
Line 155: Line 155:
if(pthis && *pthis)
if(pthis && *pthis)
{
{
pthis->dtor();
(*pthis)->dtor();
free(*pthis); *pthis = NULL;
free(*pthis); *pthis = NULL;
}
}