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. Can anyone help me.I need basic requirements with
View Tutorial          By: Elaiyaraja at 2009-03-09 03:47:46

2. gr8t man.....! i am satisfied with ur explanation
View Tutorial          By: raja deepa at 2011-07-05 13:44:21

3. its a very very good artical
View Tutorial          By: xyz at 2011-06-17 08:12:26

4. i totally disagree with Gerardo Saldív
View Tutorial          By: Shivesh at 2009-09-24 23:46:42

5. Which one is the inbuilt Abstract class in java
View Tutorial          By: vikas jain at 2013-04-16 07:25:33

6. Thanks for the useful tutorials abt strtus 1 vs St
View Tutorial          By: Sudharsan at 2011-12-03 11:54:58

7. thanks bro it helped me to answer my facu
View Tutorial          By: kasmin at 2010-01-08 08:11:32

8. How do use qsort to sort lines in text file?
View Tutorial          By: kenny at 2008-11-18 08:59:55

9. Can u plz send me woking application (Send sms) J
View Tutorial          By: Ritanshu Goel at 2012-09-22 05:53:24

10. This is awesum !!!
easy to understand ....

View Tutorial          By: Sud at 2011-01-19 08:37:55