Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: ANNOUNCE: VdrTetris-Plugin-0.2.2



Klaudius.Chlebosch@t-online.de (Klaudius Chlebosch) wrote:

> > anyway, you may try to declare ~GameTetris() and Show() (lines 29 &
> > 30) in plugin.cpp as virtual, so they look like this:
> >
> > class GameTetris : public cOsdObject {
> > public:
> >    virtual ~GameTetris()   { tetris_stop(); }
> >    virtual void Show(void) { tetris_start(x, y, s, c); }
> >    eOSState ProcessKey(eKeys Key);
> > };
> >
> > note, that i don't expect this to work! ;-) but you could try
> > anyway.
> >
> 
> in most cases it is a VERY good idea to declare a destructor virtual
> if you use inheritance. Especially if the class to inherit from is
> designed for this purpose ( and cOsdObject has a virtual destructor in
> 1.1.20 ). Are you shure that your non-virtual ~GameTetris is ever
> called ?

IMHO, it does not matter, if a methode is declared virtual in the
chiled class. it has to be virtual in the base class, though.
and of'course it would make a difference, if i would derive from
GameTetris afterwards.

but, i'm not 100% shure about this. :-) if anybody could make a clear
statement?

thx ...
clemens


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index