Pergunta de entrevista da empresa Goldman Sachs

why C++ deconstructor defined as virtual

Respostas da entrevista

Sigiloso

23 de set. de 2010

Destructors must be virtual in C++ to make sure the whole object is deleted, not just the part of the object that the pointer type points to.

Sigiloso

19 de mai. de 2010

my C++ experience was 7/8 years ago, I could not answer this questions