Should i call a destructor explicitly on a local variable?, C/C++ Programming

Assignment Help:

Should I call a destructor explicitly on a local variable?


Related Discussions:- Should i call a destructor explicitly on a local variable?

Explain multiple inheritance, Multiple Inheritance Multiple inheritance ,...

Multiple Inheritance Multiple inheritance , as the name suggests , is  deriving a class from more than one class . The derived class inherits all the properties of all its base c

COMPUTER, THEORY OF A COMPUTER PROGRAMMING

THEORY OF A COMPUTER PROGRAMMING

Html, world wide web commands

world wide web commands

Write an application to test class integerset, Set of Integers) Create clas...

Set of Integers) Create class IntegerSet. Each IntegerSet object can hold integers in the range 0-100. The set is represented by an array of bools. Array element a[i] is true if in

C program for diviser, C Program for DIVISER   void main() {  ...

C Program for DIVISER   void main() {           int result,number,min;           clrscr();           printf("ENTER THE NUMBER=");           flushall();

Define local classes, A cl a s s c a n b e d e f i n e ...

A cl a s s c a n b e d e f i n e d i n s i d e a b l o c k o r f u n c t i o n.   T h i s t yp e cla s s i s known

Why shouldn''t matrix class''s interface look like an array, Why shouldn't ...

Why shouldn't Matrix class's interface look like an array-of-array? A: Some people build a Matrix class that has an operator[] that returns a reference to an Array object (or po

Probabilistic hough transform, Two kinds of line detection are implemented ...

Two kinds of line detection are implemented in OpenCV, the Hough Transform and the probabilistic Hough transform. Assume that there are n feature points in an image and that it tak

3/15/2013 5:24:06 AM

Q: Should I call a destructor explicitly on a local variable?

A: No.

The destructor will get called again at close} of the block wherein the local was created. It is a guarantee of the language; it happens automatically; there''s no way to discontinue it from happening. But you can really get bad results from calling a destructor on the same object a second time! Bang! You''re dead!

 

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd