Skip to content
Prev 14085 / 398502 Next

connections: remember to close it!

On Tue, 2 Oct 2001, Liaw, Andy wrote:

            
Some terminology:

     `close' closes and destroys a connection.

     `closeAllConnections' closes all open user connections.

Notice the distinction.

You can close and destroy connections later. Just call
showConnections(all=FALSE)  and then use
close(getConnection(some.number)).  This *is* on the *same* help page as
closeAllConnections.

closeAllConnections was broken when close was made generic. It should read

function ()
{
    set <- getAllConnections()
    set <- set[set > 2]
    for (i in seq(along = set)) close(getConnection(set[i]))
    invisible()
}

and needs to be amended to handle the sink stack.