> There's no finalizer on the Socket class that closes it so that even if it
> is garbage collected, the socket is not closed at the OS level. I think I
> saw somewhere this was done by design and actually I believe it's much
> cleaner to properly close the socket before losing any reference to it so
> that OS resources are freed as early as possible. Much better for
> scalability ;-)
"By design," huh? We call such thinking: bugs on purpose (also known to the
anti-MSFT crowd as windows programming). <smile>
Yes, it's best to clean up. But no, a finalizer should discard any open
resources as that what it was designed for. After all, if the object is
GCed, then nobody is using it, so nobody ever will close it. At any rate,
sounds like the PG team has already fixed the leak in its code. Thanks
guys.
David