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. Hi Kartikeyan and all,

can you plea

View Tutorial          By: Piyush at 2008-11-14 07:24:16

2. Great!
View Tutorial          By: justauser at 2012-08-31 13:57:58

3. where i put this rar file to include comm api
View Tutorial          By: shubham bansal at 2015-02-20 12:13:16

4. Did you check if you are using the correct usernam
View Tutorial          By: Murugan at 2011-11-18 09:28:47

5. How do i get tht GSM Connection .Can any one give
View Tutorial          By: srinivas raju at 2008-08-08 02:50:02

6. Please guys i need sms.zip. I tried SMS.RAR but al
View Tutorial          By: Waseem at 2010-03-06 15:48:40

7. This is a great tutorial. I have a slight problem,
View Tutorial          By: Vix at 2010-11-22 13:42:03

8. I have an error on step 0:

recipien

View Tutorial          By: xenogaz at 2009-01-28 02:43:50

9. method overloading possible across classes????
View Tutorial          By: Rohit at 2011-01-26 20:23:02

10. public class zcxzcStack
{
//push fun

View Tutorial          By: eissen at 2014-09-22 13:32:20