Re: [sigc] sigc::trackable::~trackable() is not virtual
- From: Murray Cumming <murrayc murrayc com>
- To: paul linuxaudiosystems com
- Cc: libsigc-list gnome org
- Subject: Re: [sigc] sigc::trackable::~trackable() is not virtual
- Date: Fri, 27 Oct 2006 08:31:01 +0200
On Thu, 2006-10-26 at 12:06 -0400, Paul Davis wrote:
> see this note in trackable.h:
>
> /*virtual ~trackable() {} */ /* we would need a virtual dtor for
> users
> who insist on using "trackable*" as
> pointer type for their own derived
> objects */
>
> and smile :)
In case you haven't figured it out yet by looking at gtkmm:
The answer for you is probably to create your own base class that
derives in turn from sigc::trackable. That class can
- derive virtually from sigc::trackable, solving your MI problems higher
up in the chain, probably meaning that you don't need to use virtual
inheritance anywhere else if it's just the ObjectBase class that it is a
common base.
- have a virtual destructor, allowing you to use it polymorphically.
For instance:
http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/classGlib_1_1ObjectBase.html
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]