lua-users home
lua-l archive

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


> What's the point of this? Since the program immediately exits anyway after
> calling lua_close, it's not obvious what effect this could have.

Some OS have problems with programs that do not deallocate their memory. 
Also, lua_close will call the GC tag method for all userdata in the 
program; if you are using extensions, that may free other resorces as well. 
On the other hand, to always call lua_close can be quite expensive for
systems that do not need that.

(it also helps a lot for testing ;-)

-- Roberto