Hi All, I've noticed in some example code from various sources, that before returning a connection object to a remote client, they make a call to System.gc(). Is this necessary or desireable? Thanks for your opinions Michael Morris
Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Hi, You may want to set some not used variables to null to help garbage collection. But, you need not call System.gc()and you will never know when the garbage being collected. Hope this helps, Frank
Sun Certified Java Programmer
Michael Morris
Ranch Hand
Joined: Jan 30, 2002
Posts: 3451
posted
0
Hi Mark, I don't see any point in it either. I've just seen several code examples in books I've read that request gc in that situation. I just wanted to make sure there wasn't some rule of thumb that I was unaware of. Thanks, Michael Morris