|
|
 |
RE: FN-FORUM java
date posted 23rd January 2003 15:50
> destroy()
>
> what is the function of this method and what can it be used
> for and how and when is it invoked?
It's used to clean up and free resources when you've finished with the
object. It's usually called declaritively after use. If you don't want
to have to explicitly destroy() the object, you can override the
Object.finalize() method which is called by the garbage collector. This
shouldn't be used by anything like db connections, etc. as garbage
collection in Java generally only happens when memory is running low and
could possibly not happen until the application is closed.
Darran.
|
 |
|