As mentioned, the workspace () provides a new Main. You can clear the variables (and the screen) as follows:
function clear() Base.run(`clear`) for var in names(Main) try eval(parse("$var=0")) catch e end end gc() end
Definition variables are constant, but can be nullified. For free types, etc. Wrap them in modules. For more information, see the first two questions here: http://docs.julialang.org/en/release-0.4/manual/faq/#how-do-i-delete-an-object-in-memory
source share