[erlang-questions] Unloading all modules from ERL session

Roberto Aloi prof3ta@REDACTED
Fri Jun 14 13:11:40 CEST 2013

In Erlang, two and only two versions of the same module can coexist in the
run time system (an old version and a new version). Processes running the
old version of the code will keep running that version (even if you load a
new version of the module) until they make a fully qualified call to the
module itself (I.e. M:F(A)). If you add a third version of the code in the
system (e.g. you load a module twice) the "very old" version gets purged
and those processes executing the obsolete version get killed. You can also
use code:purge and code:soft_purge to "force" this behaviour. Look at the
"code" module for more options.
On 14 Jun 2013 02:29, "Steve Davis" <steven.charles.davis@REDACTED> wrote:

> Why not make:all([load]).
> ???
> e.g. I have this in my user_default...
> make() ->
> {ok, WorkingDir} = file:get_cwd(),
> case file:read_file_info("Emakefile") of
> {ok, _} -> io:format("Emake ~p~n", [WorkingDir]);
> {error, _} -> io:format("~p~n", [WorkingDir])
> end,
> make:all([load]).
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130614/c340fccc/attachment.htm>

More information about the erlang-questions mailing list