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



Subscribe to Tutorials

Related Tutorials

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

Java program using Method Overriding

Archived Comments

1. i want to know how to connect one page to another
View Tutorial          By: mahesh at 2009-08-26 01:31:40

2. if time out at step 6*** Exception is occure

View Tutorial          By: Bharat at 2011-08-17 10:42:23

3. thanks for all thanks for your help good bye
View Tutorial          By: ARAS at 2010-05-14 06:50:47

4. Can anybody send the full working code for sending
View Tutorial          By: Atul at 2008-11-26 04:47:51

5. Its nice and really apriciate rakesh sir i try t
View Tutorial          By: prince at 2013-04-18 09:46:34

6. I want to send a message using mobile browser to s
View Tutorial          By: Richa Bhatia at 2009-12-08 22:33:36

7. Hi Shiva,
Comparator interface is used to o

View Tutorial          By: Srinath at 2015-04-19 08:23:20

8. Can Some body help me??
i want To show date

View Tutorial          By: saif at 2013-04-29 09:22:31

9. This all works fine, but when I read records from
View Tutorial          By: Ayac at 2011-10-31 10:58:21

10. Great Help...
View Tutorial          By: adity at 2012-04-27 05:34:26