Of course, if it was assigned to a symbol somewhere outside the function evaluation environment (as it was in the OP example), the environment will continue to exist. In this sense, an environment is similar to any other R. object. (The fact that unassigned environments can be stored in closures means that environments are sometimes saved where other types of objects will not, but that's not what happens here.)
funfun <- function(inc = 1){
dataEnv <- new.env()
dataEnv$d1 <- 1 + inc
dataEnv$d2 <- 2 + inc
dataEnv$d3 <- 2 + inc
assign('dataEnv', dataEnv, envir = globalenv())
}
funfun()
ls(env=.GlobalEnv)
Filter(isTRUE, eapply(.GlobalEnv, is.environment))
In the example, the OP is relatively easy to track because the medium has been assigned to the character in .GlobalEnv. In general, although (and again, like any other R object), it will be difficult to track if, for example, it is assigned an element in the list or a more complex structure.
(, , R . , (, v <- f()), . !)