Re: Question about virtual

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: JSmith (jsmithmitra_at_yahoo.com)
Date: 10/22/04


Date: Fri, 22 Oct 2004 11:10:03 -0700

Thanks Joseph.

"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
news:gjchn0pbleo27hpv8jpvpp2pff8fo8kec7@4ax.com...
> Since there is no good reason to remove the virtual keyword, why bother?
The problem is
> that if a virtual destructor is assumed by the framework and you remove
the virtual
> keyword, you will get some really nasty behavior.
>
> So leave it alone. It makes no difference as far as anything you should be
concerned about
> should matter.
> joe
>
> On Thu, 21 Oct 2004 12:13:26 -0700, "JSmith" <jsmithmitra@yahoo.com>
wrote:
>
> >Hi,
> >
> >when we use Wizard to create a new class. The destructor is generated as
> >"virtual". Can you please explain why is that ?
> >Will it be a problem if we remove virtual keyword ?
> >
> >thanks,
> >
> >
>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm



Relevant Pages

  • Re: Question about virtual
    ... Since there is no good reason to remove the virtual keyword, ... that if a virtual destructor is assumed by the framework and you remove the virtual ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: Template method pattern in Java ???
    ... > requires the virtual keyword to get dynamic binding. ... is not a reason to avoid virtual functions. ... designed the class with overriding in mind, ... Safety is also ...
    (comp.lang.java.programmer)
  • Re: Template method pattern in Java ???
    ... > requires the virtual keyword to get dynamic binding. ... is not a reason to avoid virtual functions. ... designed the class with overriding in mind, ... Safety is also ...
    (comp.lang.java.help)
  • Re: Template method pattern in Java ???
    ... > requires the virtual keyword to get dynamic binding. ... is not a reason to avoid virtual functions. ... designed the class with overriding in mind, ... Safety is also ...
    (comp.object)
  • virtual destructor revisted
    ... Is this the only reason to define "virtual destructor" for a Base class? ... Derived object like that, does this mean that a "virtual destructor" is ...
    (comp.lang.cpp)