Destructor on a local variable, C/C++ Programming

Should I explicitly call a destructor on a local variable? Explain it.

Posted Date: 2/13/2013 1:39:17 AM | Location : United States





No! 

The destructor will get called again at the close} of the block where the local was created. This is a assurance of the language; it occurs automatically; there''s no way to stop it from happening. But you can get actually bad results from calling a destructor on similar object a second time! Bang! You''re dead!

Posted by Bony | Posted Date: 2/13/2013 1:41:49 AM


Related Discussions:- Destructor on a local variable, Assignment Help, Ask Question on Destructor on a local variable, Get Answer, Expert's Help, Destructor on a local variable Discussions

Write discussion on Destructor on a local variable
Your posts are moderated
Related Questions
Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given


Are comments included during compilation stage and placed in EXE file as well? - No, comments encountered by compiler are disregarded. - Their only purpose is ease and guida


Description - The TR-069 CPE WAN Management Protocol (CWMP) is a protocol that was created by the Broadband Forum (formally the DSL Forum) which sets out a common method for CPE de

Passing and Returning Objects Objects can be passed to a function and returned back just like normal variables. When an object is passed by content, the compiler makes another

print this pattern 1 01 101 0101

C program to print L diagonal triangle: void main() {                 int i=0,j=0;                 int arr[rows][cols];                 for (i=0; i

Explain Formatted Input Output with File Pointer? Likewise there are equivalents to the functions scanf and printf which write or read data to files. These are called fscanf a

The rPeANUt simulator provides buffering of the characters that are typed into the terminal. However, this would generally not be the case so if the program did not consume a chara