Hi Rajeshwar
        The methods are basically equivalent. Both suggest to the JRE that
it might be a good idea if the garbage collector actually does some work
now.
        Specifically, System.gc() is a static method so it's a wee bit more
convenient to use rather than having to do e.g., Runtime.getRuntime().gc().
        Thanks
        sumeet

> -----Original Message-----
> From: Rajeshwar Rao Vadheraju [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 13, 2001 7:31 AM
> To:   [EMAIL PROTECTED]
> Subject:      Off Topic-Use of finalization() method
>
> Hai Guys,
> Of course this is not related to servlets,i expect answer from our
> community.
> If I override finalize() method of Object in my class, when it get
> invoked?
> And I read somewhere that call to runFinalization() method of System or
> Runtime will invoke finalize() method.
> Is it true?(I tried but failed)
> Intersting point is that,when i call System.gc(),then finalize() method is
> invoking.
>
> why there are two runFinalization methods,one is in system class and
> another
> is in Runtime.
>
> Regards
> Rajeshwar Rao
> Quark-India.
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to