Click here to Skip to main content
15,909,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionvirtual destructor Pin
George_George18-Oct-07 2:10
George_George18-Oct-07 2:10 
AnswerRe: virtual destructor Pin
James R. Twine18-Oct-07 2:17
James R. Twine18-Oct-07 2:17 
GeneralRe: virtual destructor Pin
toxcct18-Oct-07 3:53
toxcct18-Oct-07 3:53 
GeneralRe: virtual destructor Pin
George_George18-Oct-07 4:08
George_George18-Oct-07 4:08 
GeneralRe: virtual destructor Pin
toxcct18-Oct-07 4:12
toxcct18-Oct-07 4:12 
GeneralRe: virtual destructor Pin
Stephen Hewitt18-Oct-07 14:42
Stephen Hewitt18-Oct-07 14:42 
GeneralRe: virtual destructor Pin
George_George18-Oct-07 4:06
George_George18-Oct-07 4:06 
AnswerRe: virtual destructor Pin
David Crow18-Oct-07 2:51
David Crow18-Oct-07 2:51 
George_George wrote:
What is the purpose of virtual destructor?


To ensure that the proper derived class destructor is called if an object of a derived class is deleted through a pointer to a base class. If a class has any virtual functions, it should have a virtual destructor.

George_George wrote:
If currently, no derived class?


Can you guarantee that your class will never be derived from? If so, then a virtual destructor is not necessary.


"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman

"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne


GeneralRe: virtual destructor Pin
George_George18-Oct-07 4:14
George_George18-Oct-07 4:14 
GeneralRe: virtual destructor Pin
toxcct18-Oct-07 4:15
toxcct18-Oct-07 4:15 
AnswerRe: virtual destructor Pin
Nemanja Trifunovic18-Oct-07 2:54
Nemanja Trifunovic18-Oct-07 2:54 
GeneralRe: virtual destructor Pin
George_George18-Oct-07 4:17
George_George18-Oct-07 4:17 
GeneralRe: virtual destructor Pin
David Crow18-Oct-07 4:26
David Crow18-Oct-07 4:26 
GeneralOff Topic, Don't rate this ! Pin
toxcct18-Oct-07 4:27
toxcct18-Oct-07 4:27 
GeneralRe: virtual destructor Pin
Nemanja Trifunovic18-Oct-07 5:42
Nemanja Trifunovic18-Oct-07 5:42 
GeneralRe: virtual destructor Pin
George_George18-Oct-07 19:19
George_George18-Oct-07 19:19 
QuestionHow to make setup Borland C++ Builder 6 Pin
upamir18-Oct-07 1:42
upamir18-Oct-07 1:42 
AnswerRe: How to make setup Borland C++ Builder 6 Pin
Nelek18-Oct-07 2:41
protectorNelek18-Oct-07 2:41 
GeneralRe: How to make setup Borland C++ Builder 6 Pin
upamir20-Oct-07 23:21
upamir20-Oct-07 23:21 
QuestionIs there an alternative solution to this? [Solved] Pin
Nelek18-Oct-07 0:51
protectorNelek18-Oct-07 0:51 
AnswerRe: Is there an alternative solution to this? Pin
Chris Losinger18-Oct-07 0:56
professionalChris Losinger18-Oct-07 0:56 
GeneralRe: Is there an alternative solution to this? [SOLVED] Pin
Nelek18-Oct-07 1:07
protectorNelek18-Oct-07 1:07 
GeneralRe: Is there an alternative solution to this? Pin
sps-itsec4618-Oct-07 1:25
sps-itsec4618-Oct-07 1:25 
GeneralRe: Is there an alternative solution to this? Pin
James R. Twine18-Oct-07 1:38
James R. Twine18-Oct-07 1:38 
GeneralRe: Is there an alternative solution to this? Pin
sps-itsec4618-Oct-07 5:27
sps-itsec4618-Oct-07 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.