when can we use virtual destructor?
Answer Posted / achal ubbott
We should know the proper sequence of calling of
destructors.
1. destructor of derived.
and then
2. destructor of base.
but if base* bptr = new derived();
then
delete bptr;
can behave wrong and violate the sequence. got it?
Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
How the endl and setw manipulator works?
What are guid? Why does com need guids?
How do you establish an is-a relationship?
What is DlgProc?
Is c++ fully object oriented?
What is the maximum value of a unsigned char a) 255 b) 256 c) 128
What's the order in which the local objects are destructed?
Will rust take over c++?
How can virtual functions in c++ be implemented?
What kind of problems can be solved by a namespace?
What is binary search in c++?
Can we inherit constructor in c++?
What is struct c++?
Is c++ a low level language?
What is anonymous object in c++?