Comment on Tutorial - C++ Destructors Versus Java Finalization By Emiley J



Comment Added by : David

Comment Added at : 2007-10-02 06:52:20

Comment on Tutorial : C++ Destructors Versus Java Finalization By Emiley J
"This happens immediately, and before any other program statements will execute. Thus, a C++ destructor will always execute in a deterministic fashion. You can always know when and where a destructor will be executed. "

Are you sure about this??? Then there must have been a change in the language. "The C++ Programming Language by Bjarne Struostrup" (granted, not the C++ standard) says in r.12.2 "The exact point of destruction is implementation dependent." Some compilers I've used do in fact destroy temporaries and automatic variables immediately; but other compilers I have used do not. It's REALLY annoying not being able to treat destructors as deterministic. If the language DOES IN FACT define the point of destruction, then I'm writing to my compiler vendors! Please give us a paragraph reference for this behavior.


View Tutorial



Related Tutorials

Java program to get location meta data from an image

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Archived Comments

1. Hi

Anybody plz send me the sms send

View Tutorial          By: Venky at 2008-11-19 08:33:22

2. i have clear that notify and wait
but where

View Tutorial          By: pp at 2009-06-29 06:12:13

3. good one
View Tutorial          By: yogesh at 2010-07-24 21:18:24

4. Thanks mate !!!

-- Anish Sneh

View Tutorial          By: Anish Sneh at 2010-08-18 07:42:56

5. Comment: yes i understood too:D:D perfect and brei
View Tutorial          By: eman at 2009-04-21 23:57:26

6. thanks i learnt how to use isset in php
View Tutorial          By: free web directory at 2010-09-15 19:42:28

7. I agree with #2 u are missing that line
View Tutorial          By: ויזה לארה"ב at 2011-10-26 10:39:50

8. I need you to Write me a program to initialize one
View Tutorial          By: Sayed maseer at 2015-06-20 05:09:12

9. Hi i have created the 5 files and in main program
View Tutorial          By: Anandkumar at 2011-09-10 05:13:59

10. hai, i tried the abvoe code, m getting the follwin
View Tutorial          By: anith at 2011-03-13 06:02:31