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. how to connect the database in servelet use to sta
View Tutorial          By: sudhir singh tomar at 2011-04-28 03:10:34

2. Works thnx :D :D :D :D
View Tutorial          By: nik at 2014-11-09 20:44:29

3. i want to get the SCJP ceretificate plz anybody ca
View Tutorial          By: arpita kotadia at 2012-09-01 06:50:03

4. Try to copy libmysql.dll to \apache\bin also. I di
View Tutorial          By: SileNT at 2009-05-05 14:34:16

5. it was very useful to me
View Tutorial          By: balaji at 2012-01-09 22:50:25

6. Hello,
could you send me the complete code

View Tutorial          By: Sanjay at 2013-04-19 07:28:12

7. Clear explaination..Thank You Sir...
View Tutorial          By: nishanth at 2014-06-16 08:58:04

8. thank for this script
because i will work

View Tutorial          By: r at 2009-06-27 05:07:31

9. Hi, these are the lines i added after i downloaded
View Tutorial          By: sandeep,p at 2012-11-22 10:17:07

10. what will be the answer of this?
int y=10;<

View Tutorial          By: divye at 2015-03-20 09:05:46