I am getting ready to write the UI for allowing user defined filters in
Illusion. My plan is for the user to compile the filter code as a
library that Illusion can find, load, execute code of and release. Can
the library be loaded/unloaded at any point in the program flow or do I
have to load it at the beginning?
Re: Do libraries have to be loaded at the beginning?
--- In [hidden email], Brian Houghton <bh@...> wrote:
> Thursday, April 20, 2006
>Can the library be loaded/unloaded at any point in the program
>flow or do I have to load it at the beginning?
You do not have to load libraries at the beginning of your program.
Now Plua has a removelib function, but Plua 2 does not (although Plua
2 will cleanup your library on program exit). It might be the case
that if you set to nil the functions and table that your library
creates, it will invoke the garbage collector and clean up the library
before your program exits---I'm not sure about that.