hadley/devtools — pull request #120 by wch (2012-07-24 02:22:59+00:00)
Title: Add function to unload dynamic libraries

I added a function `unload_dynlibs` which unloads DLLs loaded by a package. It gets called by `unload()`.

To see it in action, you can do this:

```
library(bitops)

# See the loaded DLLs
.dynLibs()

# This will detach the package and unload the DLLs
# (Need to give it the full path to get the package object?)
unload(as.package('/Library/Frameworks/R.framework/Versions/2.15/Resources/library/bitops/'))

# See the loaded DLLs
.dynLibs()
```

You can repeat to see that it will reload again properly.