[C++-sig] Object lifetime issue
Hans Meine
meine at informatik.uni-hamburg.de
Mon Sep 3 11:51:00 CEST 2007
Am Sonntag, 02. September 2007 01:07:47 schrieb Matt Holmes:
> I am trying to expose one of the classes in my engine as an abstract
> class that is used as the base for a series of Python classes.
>
> That class is called InputCommand and is defined as such:
> namespace Stasis {
> class InputCommand {
> public:
> virtual bool execute() = 0;
> };
> }
My compiler warns me in such cases that you have a virtual function, but no
virtual destructor (IIRC Scott Meyers' effective C++ has a section on that).
Don't know if that's related, but note that no destructor of derived classes
can be guaranteed to be called from C++.
Ciao, / /
/--/
/ / ANS
More information about the Cplusplus-sig
mailing list