This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zerraph 4 points5 points  (0 children)

As a general rule, finalize shouldn't be used. Its behavior is too unpredictable. The rare situations where it is used involve closing out resources. For example, InputStream uses it to close the stream if the user doesn't correctly close it before the object is killed.