The R Project SVN R

Rev

Rev 59039 | Rev 65009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 59039 Rev 61168
Line 34... Line 34...
34
  \code{\link{gc}} and \code{\link{Memory}} for garbage collection and
34
  \code{\link{gc}} and \code{\link{Memory}} for garbage collection and
35
  memory management.
35
  memory management.
36
}
36
}
37
\examples{
37
\examples{
38
f <- function(e) print("cleaning....")
38
f <- function(e) print("cleaning....")
39
g <- function(x){ e <- environment(); reg.finalizer(e,f) }
39
g <- function(x){ e <- environment(); reg.finalizer(e, f) }
40
g()
40
g()
41
invisible(gc()) # trigger cleanup
41
invisible(gc()) # trigger cleanup
42
}
42
}
43
\keyword{programming}
43
\keyword{programming}
44
\keyword{environment}
44
\keyword{environment}