× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David Gibbs skrev:
Lim Hock-Chai wrote:
Is there a guideline on when should an application manually calls the
finalize(), System.runFinalization(), or System.gc()? Or should
application never calls these methods and let the JVM mangement it on
its own?

I've always been under the assumption that you should let the JVM manage finalization.

In fact, I think it's recommend that you don't even create your own finalization method, as there is no guarantee as to when it will actually run.
Agreed.

Altså System.gc() is just a hint that you think that now would be a good time to do garbage collection.
In my experience the best you can do to help the JVM is to let objects fall out of scope as soon as you are done with them, or even remove references early by setting them to null. More than that requires external tuning of the JVM.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.