> Albrecht Schlosser wrote: > > ... > > What happens? Note that img points to an Fl_Shared_Image object. > > The compiler can't detect this, can it? Will the Fl_Shared_Image > > be destroyed? > > Yes, it will, since the destructor of a class is always virtual. Always virtual ? Isn't it only if base class destructor explicitly use the virtual keyword ?, I think that if you don't specify virtual the base class destructor explicitly ; it won't call correctly the derived classes destructors ...
I think Bill used that trick to 'optimize' memory deallocation time when exiting an application in FLTK2 ... Fabien _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
