c++ - Pure virtual call in destructor of most derived class -


i know shouldn't call virtual function in ctor or dtor of base class, of derived class? should fine right? e.g.

class base {     ...     virtual void free() = 0; }; class child : public base {     ...     free() {/* free memory */}     ~child() {free();} }; 

well, can it, dynamic type of *this inside child::~child() child, , not more derived. when have further derived class class foo : child overrides free(), overridden function not called.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -