zhengxwen / gdsfmt

R Interface to CoreArray Genomic Data Structure (GDS) Files (Development version only)
http://www.bioconductor.org/packages/gdsfmt
18 stars 4 forks source link

Opened GDS file can be garbage collected #28

Open zhengxwen opened 4 years ago

zhengxwen commented 4 years ago

Since gdsfmt_v1.23.9:

library(gdsfmt)

fc <- function()
{
    f <- createfn.gds("test.gds")
    node <- add.gdsn(f, name="list", val=list(x=c(1,2), y=c("T","B","C"), z=TRUE))
    # forget to close the file
}

fc()
showfile.gds()
#                      FileName ReadOnly State
#  1 /Documents/GitHub/test.gds    FALSE  open

gc()
showfile.gds() # no opened file