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
What language does google use?
What is a far pointer? where we use it?
What is a down cast?
Explain how an exception handler is defined and invoked in a Program.
What are the types of pointer?
Can member data be public?
What is c++ hiding?
Evaluate !(1&&1||1&&0) a) Error b) False c) True
what are the events occur in intr activated on interrupt vector table
What is the full form nasa?
what is data encapsulation in C++?
Which software is best for c++ programming?
What is the use of vtable?
How do pointers work?
What are c++ redistributables?