why destructor is not over loaded?
Answers were Sorted based on User's Feedback
Answer / ramakant
Normally (in fact almost always) you never explicitly call
the destructor, it is automatically called by the C++ frame
work when the object is deleted/goes out of scope.
Therefore you would not need to overload the destructor
because the frame work always calls the default destructor.
Additionally the C++ standard defines that a conforming
compiler only allows for 1 destructor per class.
| Is This Answer Correct ? | 21 Yes | 2 No |
Answer / test
Destructor is not over loaded because OOP you can't Invoke a
call of the destructor (Dispose is another thing)
| Is This Answer Correct ? | 12 Yes | 3 No |
Answer / varun
Normally you never explicitly call
the destructor, it is automatically called by the C++ frame
work when the object is deleted/goes out of scope.
Therefore you would not need to overload the destructor
because the frame work always calls the default destructor.
Additionally the C++ standard defines that a conforming
compiler only allows for 1 destructor per class.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / gyana
In c# we cannot over load the desructor as because
destructor is presented by defaultly in c# and we cannot
create any object of it.we cannot also define a new
desructor.It cannot be explicitly used.for this reason we
cannot invoke the desructor and it cannot be overloaded..
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / m.salah
destructor not overloaded because not has parameters
| Is This Answer Correct ? | 9 Yes | 12 No |
What are the advantages of polymorphism?
what are the disadvantages of C++?
25 Answers ATS, Infosys, UNI, Wipro,
How do you define social class?
write a short note on Overloading of Binary Operator?
explain sub-type and sub class? atleast u have differ it into 4 points?
What is Dynamic Polymorphism?
What is R T T I ?
What are the benefits of oop?
what's the basic's in dot net
What is the benefit of oop?
Can we create object of interface?
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?