I'm having an unpredictable error relating to a core dump, one thats very hard to make an MWE. In the mean-time, I'm wondering if I can fix the error reliably by making sure I'm not storing too many things in memory
foo = function(){
runif(10000)
}
foo()
If I run this as a script, does the 10,000 long vector get garbage collected? Or do I have to wrap calls to foo()
in a function that returns nothing in order for the memory to get freed?