search for: closerindex

Displaying 1 result from an estimated 1 matches for "closerindex".

2007 Aug 03
2
How to properly finalize external pointers?
...m$dynlib.ext, sep = ""))) } doneRindex <- function(){ dyn.unload(file.path(.libPaths(), "rindex", "libs", paste("rindex", .Platform$dynlib.ext, sep = ""))) } openRindex <- function(n=10){ .Call("rindex_open", as.integer(n)) } closeRindex <- function(extPtr){ .Call("rindex_close", extPtr) } if (FALSE){ # now try it require(rindex) initRindex() extPtr <- openRindex() extPtr extPtr2 <- closeRindex(extPtr) extPtr2 gc() extPtr <- openRindex() extPtr2 <- extPtr extPtr2 rm(extPtr) g...