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

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, good afternoon
i don,t know how to use

View Tutorial          By: Hemanshu at 2012-01-17 06:49:10

2. Hello all,Actually i want xml parser in blackberry
View Tutorial          By: arun at 2011-06-01 06:17:16

3. hi its working nice,can u plz help me how to fetch
View Tutorial          By: Manju gowda at 2014-02-21 07:23:44

4. i Want the Flow Chart and code for the mobile Cale
View Tutorial          By: Sudip Khatiwara at 2010-03-15 04:10:41

5. javax.microedition.media.MediaException: Malformed
View Tutorial          By: adi at 2012-04-01 11:51:17

6. can you please explain this..!!

t =

View Tutorial          By: kalyan at 2011-06-30 00:01:10

7. could you plz tell me how to run this all programs
View Tutorial          By: abhishek at 2010-10-27 00:08:57

8. I und. you guy's are using programming language to
View Tutorial          By: Ken at 2011-07-25 07:10:41

9. if i want to write my gmail address how can i prov
View Tutorial          By: asmcn at 2011-12-27 19:40:49

10. Create a lexical analyzer of the C- programming la
View Tutorial          By: lucky at 2011-05-06 23:05:22