Can you explicitly call a destructor on a local variable?
Answer / Mandeep Kumar Srivastava
No, you cannot explicitly call the destructor of a local variable. The destructor is called automatically when the local variable goes out of scope or when it is deleted using delete.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can we make copy constructor private in c++?
What is & in c++ function?
Why is c++ a mid-level programming language?
What is the difference between new() and malloc()?
Profiler in projects?
How many keywords are used in c++?
what is the emaning of '#include" "'?
Array base access faster or pointer base access is faster?
List the features of oops in c++?
How can we check whether the contents of two structure variables are same or not?
Can you explicitly call a destructor on a local variable?
what is Member Functions in Classes?