Skip to content
Prev 164359 / 398503 Next

read.*: How to read from a URL?

On 10/12/2008 5:41 PM, Prof Brian Ripley wrote:
I think one of the reasons connections are underused is because of 
uncertainty about things like this.  The docs are unclear about when 
automatic cleanup occurs.  Does "eventually" mean at the next garbage 
collection time?  If our 128 entry connection table is full, and someone 
tries to open a new one, will there be a forced gc, to free up any 
unreferenced ones?

If the answer to both questions is "yes", then the explicit close is 
more efficient than relying on the automatic one, but not strictly 
necessary, and it would certainly be more convenient than having to 
remember when the close() is needed.

Duncan Murdoch