[erlang-questions] Re: Cannot unload module from remote shell

Matthias Lang <>
Thu Dec 16 17:18:07 CET 2010

On Thursday, December 16, Dmitri Minaev wrote:

> code:delete/1 unloads the module (is_loaded returns false), but any call of
> the functions from that module results in it being loaded again. So, does
> Erlang cache the content of the loaded modules?  

No, it doesn't.

> How does it get reloaded when the files are removed?

It shouldn't. This is unexpected. Either something strange is going on
or you've made a mistake.

> It looks like Erlang saves its image before exiting and reloads it
> when starting again (a behavior one might expect from a Lisp
> system), but I am not certain if this functionality is even
> available in Erlang.

Erlang doesn't have an "image" of the sort you describe.

You can investigate the problem a bit by using the 'code' module. In
particular, try calling


and see what is says (you need to replace 'dmitrys_module' with
whatever your module is really called) . Then you might also want to
look at


says. After doing that, you should have a pretty good idea of
where the code is coming from.

About the only wildcard in all of this is that rabbitmq might be doing
something weird and unexpected. If that were the case, I would have hoped
that the rabbitmq people would have piped up and said something by now ;-)


More information about the erlang-questions mailing list