lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Within the same Lua environment, is it possible to dynamically load
> and unload chunks?

Load -- yes.  Unload -- don't know.

I dynamically load/reload chunks all the time so I can edit scripts 
'live'.  However I don't use coroutines.  The only major things I've 
had to watch out for are:

- making sure to access things by name, not by reference

- making sure that I do NOT reload variable definitions that can 
possibly trash important global data

Brian