Re: Calling GC routine in alternative ways
From: Dan Nuttle (d_nuttle_at_hotmail.com)
Date: 03/08/04
- Next message: Dan Nuttle: "Re: need help with the following code (vector)"
- Previous message: Dan Nuttle: "Re: JSP"
- In reply to: lonelyplanet999: "Calling GC routine in alternative ways"
- Next in thread: Moshe Sayag: "Re: Calling GC routine in alternative ways"
- Reply: Moshe Sayag: "Re: Calling GC routine in alternative ways"
- Reply: Doug Pardee: "Re: Calling GC routine in alternative ways"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Mar 2004 04:12:04 GMT
Not only is there no difference, there really is no point in calling the
garbage collector. First, there is no guarantee when your request will be
processed. It doesn't necessarily happen right away. And second, the JVM
has an algorithm that determines when to call the garbage collector
automatically anyway. (This algorithm varies from JVM to JVM, with
potentially dramatic effects on performance under high-load conditions.)
Calling the garbage collector manually doesn't buy you anything, so far as I
know. Putting the ability to call gc manually into Java was, quite frankly,
a mistake. This mistake (unlike some others) is harmless, because calling
the gc won't hurt anything. Of course, if the ability to call the gc leads
you to believe that you have a level of control over the JVM that you don't
have, that might lead to poor design or coding decisions.
- Next message: Dan Nuttle: "Re: need help with the following code (vector)"
- Previous message: Dan Nuttle: "Re: JSP"
- In reply to: lonelyplanet999: "Calling GC routine in alternative ways"
- Next in thread: Moshe Sayag: "Re: Calling GC routine in alternative ways"
- Reply: Moshe Sayag: "Re: Calling GC routine in alternative ways"
- Reply: Doug Pardee: "Re: Calling GC routine in alternative ways"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|