[prev in list] [next in list] [prev in thread] [next in thread]
List: gtkmm
Subject: Re: [gtkmm] destroy_impl()
From: Karl Nelson <kenelson () ece ! ucdavis ! edu>
Date: 2000-04-26 20:49:03
[Download RAW message or body]
> As I can undestand, destroy_impl() doesn't present. Is this bug or
> feature?
Feature. destory_impl is a virtual function which is almost always
called from inside the dtor. However, because of C++ specification
calling a virtual within a dtor will not give expected results.
Ie.
class A
{
virtual void destroy() { cout << "A::destroy"; };
virtual ~A() { destroy(); }
};
class B: public A
{
virtual void destroy() { cout << "B::destroy"; };
};
{
B b;
}
What should this give?
According to gtk+ rules I should get B::destroy, but according
to C++ I get A::destroy. (depending on which object does first
Gtk+ or Gtk-- you will get one or the other.)
Therefore, we really couldn't place a destroy_impl without
a lot of explaining. It is a feature not to have it.
Does that help?
--Karl
_______________________________________________
to unsubscribe or change your subscription parameters :
http://lists.sourceforge.net/mailman/listinfo/gtkmm-main
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic