Frequently Asked Questions
Frequently Asked Questions
Sessions and the REPL
How do I delete an object in memory?
Julia does not have an analog of MATLAB’s clear
function; once a name is defined in a Julia session (technically, in module Main
), it is always present.
If memory usage is your concern, you can always replace objects with ones that consume less memory. For example, if A
is a gigabyte-sized array that you no longer need, you can free the memory with A = 0
. The memory will be released the next time the garbage collector runs; you can force this to happen with gc()
.