Exception Safety and Garbage Collection and Some Other Stuff
by eplawless on May 06, 2011
- 14,256 views
It’s very likely that you’ve been writing totally incorrect code without realizing it. While not a full solution, this is an extremely informal attempt at an overview of the problem.
It’s very likely that you’ve been writing totally incorrect code without realizing it. While not a full solution, this is an extremely informal attempt at an overview of the problem.
Accessibility
Categories
Upload Details
Uploaded via SlideShare as Microsoft PowerPoint
Usage Rights
© All Rights Reserved
Statistics
- Likes
- 4
- Downloads
- 69
- Comments
- 4
- Embed Views
- Views on SlideShare
- 14,117
- Total Views
- 14,256
A finally block -always- gets executed. The purpose is to clean up resources regardless of whether a catch block exists or not (without a catch block, the exception bubbles to the callee, but just prior to the exception being thrown, any statements inside the finally block will be invoked).
The finalize method (on the Object super class) is executed on the terms of the JVM. Is that what you're referring to?
http://download.oracle.com/javase/6/docs/api/java/lang/Object.html#finalize%28%29 2 years ago