search for: new_foo

Displaying 7 results from an estimated 7 matches for "new_foo".

Did you mean: new_fb
2018 Mar 26
4
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
...n (thanks!) further simplified my example, and it turns out that the issue (whether a feature or a bug is yet to be seen) had to do with S3 dispatching. The following example, by Winston, depicts the issue: print.foo <- function(x, ...) { cat("print.foo called\n") invisible(x) } new_foo <- function() { e <- new.env() reg.finalizer(e, function(e) message("Finalizer called")) class(e) <- "foo" e } new_foo() gc() # still in .Last.value gc() # nothing I would expect that the second call to gc() should free 'e', but it's not. However,...
2018 Mar 27
2
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
...uke-tierney at uiowa.edu wrote: > This has nothing to do with printing or dispatch per se. It is the > result of an internal register (R_ReturnedValue) being protected. It > gets rewritten whenever there is a jump, e.g. by an explicit return > call. So a simplified example is > > new_foo <- function() { > e <- new.env() > reg.finalizer(e, function(e) message("Finalizer called")) > e > } > > bar <- function(x) return(x) > > bar(new_foo()) > gc() # still in .Last.value > gc() # nothing > > UseMethod essentially does...
2018 Mar 27
1
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
...is has nothing to do with printing or dispatch per se. It is the >>> result of an internal register (R_ReturnedValue) being protected. It >>> gets rewritten whenever there is a jump, e.g. by an explicit return >>> call. So a simplified example is >>> >>> new_foo <- function() { >>> e <- new.env() >>> reg.finalizer(e, function(e) message("Finalizer called")) >>> e >>> } >>> >>> bar <- function(x) return(x) >>> >>> bar(new_foo()) >>> gc()...
2018 Mar 27
2
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
...t;luke-tierney at uiowa.edu>: > This has nothing to do with printing or dispatch per se. It is the > result of an internal register (R_ReturnedValue) being protected. It > gets rewritten whenever there is a jump, e.g. by an explicit return > call. So a simplified example is > > new_foo <- function() { > e <- new.env() > reg.finalizer(e, function(e) message("Finalizer called")) > e > } > > bar <- function(x) return(x) > > bar(new_foo()) > gc() # still in .Last.value > gc() # nothing > > UseMethod essentially...
2018 Mar 27
0
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
This has nothing to do with printing or dispatch per se. It is the result of an internal register (R_ReturnedValue) being protected. It gets rewritten whenever there is a jump, e.g. by an explicit return call. So a simplified example is new_foo <- function() { e <- new.env() reg.finalizer(e, function(e) message("Finalizer called")) e } bar <- function(x) return(x) bar(new_foo()) gc() # still in .Last.value gc() # nothing UseMethod essentially does a return call so you see the effect there. The...
2018 Mar 27
0
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
...edu>: >> This has nothing to do with printing or dispatch per se. It is the >> result of an internal register (R_ReturnedValue) being protected. It >> gets rewritten whenever there is a jump, e.g. by an explicit return >> call. So a simplified example is >> >> new_foo <- function() { >> e <- new.env() >> reg.finalizer(e, function(e) message("Finalizer called")) >> e >> } >> >> bar <- function(x) return(x) >> >> bar(new_foo()) >> gc() # still in .Last.value >> gc(...
2007 Aug 17
0
map.with_options :path_prefix => ''
...Any help is appreciated. My foo model has a polymorphic owner which is what I want the path_prefix to represent, so my routes.rb has something like... map.with_options :controller => ''foos'', :path_prefix => '':owner_type/:owner_id'' do |foos| foos.new_foo ''/foos/new'', :action => ''new'' foos.create_foo ''/foos'', :action => ''create'', :conditions => {:method => :pos...