This calls the currently assigned finalizer, either via R's finalization mechanism or manually.
finalize(x, ...)
# S3 method for ff_pointer
finalize(x, ...)
# S3 method for ff
finalize(x, ...)
# S3 method for ffdf
finalize(x, ...)
currently ignored
returns whatever the called finalizer returns, for ffdf a list with the finalization returns of each physical component is returned.
The finalize.ff_pointer
method is called from R after it had been passed to reg.finalizer
. It will set the finalizer name to NULL
and call the finalizer.
The finalize
generic can be called manually on ff
or ffdf
objects. It will call the finalizer but not touch the finalizer name.
For more details see finalizer
# NOT RUN {
x <- ff(1:12, pattern="./finalizerdemo")
fnam <- filename(x)
finalizer(x)
is.open(x)
file.exists(fnam)
finalize(x)
finalizer(x)
is.open(x)
file.exists(fnam)
delete(x)
finalizer(x)
is.open(x)
file.exists(fnam)
rm(x)
gc()
# }
Run the code above in your browser using DataLab