Finalize
Garbage collection
- object with no references from "program" can be collected
- done automatically, asynchronously; no memory "leaks"
Finalize
- method called before object collected
- remember that garbage collection is asynchronous; finalize is called eventually
- finalize only called once
- must have correct signature (see example)
default finalizer
- most objects don't need explicit finalize code