Hi,
If an Erlang session on command prompt is running and I call a function from a module, the module gets loaded. If I realize that there is a bug, and while leaving the erl session running, change the code and recompile the module and amny other modules, the older version of the module remains loaded in teh erl session.
How do I unload all loaded modules so that the newly compiled modules get loaded the next time I invoke the function in the erl session, the new code takes effect?
Thanks,
Yash
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions
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.