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. > Will ~Fl_Shared_Image() be called, and what should this do? The Fl_Shared_Image destructor will get called. It *should* remove the image from the shared image list. > Currently the Fl_Shared_Image would be removed from the image > list only if release() would be called, but we'd have a problem > anyway, since there might be other pointers to the shared image. Yup, and we'll just have to educate users about this - don't use delete on shared images, don't mix delete with retain/release, etc. -- ______________________________________________________________________ Michael Sweet, Easy Software Products mike at easysw dot com _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
