| Author |
Garbage Collection
|
majohnad majohnad
Greenhorn
Joined: Jan 01, 2003
Posts: 24
|
|
Hi All, is the below statement is right? if so how it is? Any class that includes a finalize method should invoke its superclass' finalize method Thanks inadvance john
|
zxjohn
|
 |
Jessica Sant
Sheriff
Joined: Oct 17, 2001
Posts: 4313
|
|
unlike constructors... finalize() methods are not implicitly chained. The thought behind "Any class that includes a finalize method should invoke its superclass' finalize method." Is to ensure that any actions done in the superclass's constructor should be undone by the superclass's finalize() method. The superclass's constructor is imlicitly called, the superclass's finalize() method is not, so you should manually call it anytime you override the finalize() method. Make sense? Did I explian that correctly? (It's a lil early, and my shower is still tryin to wake me up... dang day light savings thing...)
|
- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
|
 |
 |
|
|
subject: Garbage Collection
|
|
|