Skip to main content
Stack Overflow
  1. About
  2. For Teams

Timeline for When to use virtual destructors?

Current License: CC BY-SA 4.0

21 events
when toggle format what by license comment
Jan 9, 2022 at 7:47 comment added xyf the first example that has no virtual destructor in the base UB no?
S May 1, 2020 at 17:06 history suggested user12117801 CC BY-SA 4.0
fixed an error
May 1, 2020 at 14:36 review Suggested edits
S May 1, 2020 at 17:06
Feb 26, 2020 at 10:39 review Suggested edits
Feb 26, 2020 at 12:03
S May 30, 2019 at 8:37 history suggested Community Bot CC BY-SA 4.0
corrected spelling and grammar
May 30, 2019 at 8:14 review Suggested edits
S May 30, 2019 at 8:37
S Mar 31, 2018 at 9:50 history suggested Daniel Carvalho CC BY-SA 3.0
Fix non-functional code example due to typo
Mar 31, 2018 at 8:41 review Suggested edits
S Mar 31, 2018 at 9:50
Nov 11, 2017 at 12:01 comment added Tunvir Rahman Tusher @rimiro Its automatic by c++.you can follow the link stackoverflow.com/questions/677620/…
Nov 11, 2017 at 8:49 comment added rooni @TunvirRahmanTusher could you please explain why the Base Destructor is called??
Aug 20, 2017 at 14:56 history edited Donald Duck is with Ukraine CC BY-SA 3.0
added 142 characters in body
Oct 3, 2013 at 12:58 comment added cape1232 @cmeub, But there is an idiom to achieve what you would want from a virtual constructor. See parashift.com/c++-faq-lite/virtual-ctors.html
Jun 4, 2013 at 13:10 history edited Tunvir Rahman Tusher CC BY-SA 3.0
deleted 30 characters in body
Apr 21, 2013 at 20:09 comment added cmeub @Murkantilism, "virtual constructors cannot be done" is true indeed. A constructor cannot be marked virtual.
Apr 19, 2013 at 6:50 comment added Tunvir Rahman Tusher " virtual constructor is not possible" means you need not write virtual constructor by your own. Construction of derived object must follow the chain of construction from derived to base. So you need not write the virtual keyword for your constructor. Thanks
S Apr 11, 2013 at 11:32 history suggested gda2004 CC BY-SA 3.0
removed the word not
Apr 11, 2013 at 11:23 review Suggested edits
S Apr 11, 2013 at 11:32
S Apr 9, 2013 at 20:02 history suggested Community Bot CC BY-SA 3.0
Correct derived ctor to eliminate ambiguity - it seems like derived destructor is called twice.
Apr 9, 2013 at 19:58 review Suggested edits
S Apr 9, 2013 at 20:02
Apr 9, 2013 at 13:57 review Late answers
Apr 9, 2013 at 14:03
Apr 9, 2013 at 13:39 history answered Tunvir Rahman Tusher CC BY-SA 3.0
toggle format

AltStyle によって変換されたページ (->オリジナル) /