Lorcan Hamill wrote:
>> My guess is that you're not calling Socket.close(), but just letting
> your socket objects go out of scope. That's fine if the garbage collector
> kicks in, because the Socket's finalize() probably calls close(), but
> the gc just ain't happening. This is quite common - the gc only kicks
> in if you're running low on memory - so it's easy to run out of
> non-memory resources if you're not careful to call "cleanup" methods
> like Socket.close() before letting your objects go out of scope.
> The GC on Windoze is probably more aggressive than the one you're now
> dealing with.
>> I could be wrong about all this - I've never seen this happen with
> sockets, but I *have* seen exactly the same problem with an app
> that processes ordinary files.
>> Good luck.
You can force garbage collection with:
You can also force finalize to be called on all objects
waiting for garbage collection with:
Mark Fallon E-mail : Mark.Fallon at oracle.com
Senior Software Engineer Phone : +353-1-8033207
Global Product Engineering Fax : +353-1-8033221
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!