Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Destructors in Theme Editor: virtual or non virtual?

Re: Destructors in Theme Editor: virtual or non virtual?

From: Al Le <al.le_at_gmx.de>
Date: Thu, 17 Jun 2010 22:34:15 +0200

On 17.06.2010 20:11, Robert Bieber wrote:

> [...] but if you inherit from a class that has a non-virtual
> destructor, and then you delete a pointer to the base class which is
> also an instance of the child class, the child class' constructor won't
> be called. Now that someone else has mentioned it, I do think that
> having the original base class constructor virtual makes all the
> following destructors virtual, but it's still safest to just explicitly
> declare them all that way.

I think you confuse constructors and destructors here. Constructors are
never virtual (and cannot be).
Received on 2010-06-17


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa