> From: Niclas Hedhman [mailto:[EMAIL PROTECTED] > > On Saturday 18 October 2003 00:37, Stephen McConnell wrote: > > An active component such as a socket server would declare a > > CONSERVATIVE policy. > > I'm not into politics, but please explain why a "Socket > Server" should hang > around in memory if it is not referenced? > > IIUIC, a socket server will be listening on a socket, i.e. > the thread is > blocked, and the thread management will maintain the reference to its > Runnable entry and GC will not mark it as "garbage". No? > > Niclas
If the worker thread is only referenced by the server, the thread itself is garbage and may end up reclaimed. Hilarity ensues in the uncontrolled shutdown. However, this assumes that the container only uses soft or weak references to its component instances - otherwise the server will not be GC'd until the container is GC'd. /LS --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
