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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program 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
Archived Comments
1. Dear Friend,
Your programs is like the one
View Tutorial By: thomas at 2009-11-02 00:38:18
2. hi, how do i turn it into a gui with swing allowin
View Tutorial By: psychicjava at 2011-02-06 13:18:08
3. If the database server goes down, should the conne
View Tutorial By: Naveen Gowd at 2012-02-02 07:17:38
4. Travis could you share steps to configure correctl
View Tutorial By: Shailesh S. at 2015-09-09 09:36:20
5. Thank you, Every thing is working fine...!!
View Tutorial By: Purushothaman at 2009-04-10 07:18:38
6. Sir , I am doing BCA . I want to know more about j
View Tutorial By: sikandar at 2011-05-22 03:09:40
7. I want to get SCJP!
View Tutorial By: Johny at 2009-08-24 22:48:56
8. Following question to this topic:
- when i
View Tutorial By: Alistair at 2012-01-14 10:59:52
9. As C does not support Function Overloading, there
View Tutorial By: N at 2013-03-06 00:27:14
10. Plz catch the exception to make the program comple
View Tutorial By: Naman at 2013-04-19 06:01:45