lua-users home
lua-l archive

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


> >The only major need I found with 5.0 'lua.c' concerning this was the
> >capability to have library cleanups
> 
> There a trick for this that could/should be implemented in lauxlib:
> Each time you open a library that needs to clean itselt up, create a
userdata,
> store it in the registry (using itself as both key and value), and set up
a GC
> method for this userdata that does the cleanup. When lua_close is called,
your
> GC method will be called automatically.

I don't want to seems stubborn, but some days ago I asked a question that
went unnoticed, so I ask again :-)

Why in lua.c the lua_close call is optional? In other words, could we make
it unconditional? Or what are the cases when we need to omit it?

Regards.

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net