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.
"In 1727, Helen Morrison, a lonely spinster, became the first woman to
place a Lonely Hearts advertisement. It appeared in the Manchester Weekly
Journal. The mayor promptly committed her to a lunatic asylum for four
weeks." - The People's Almanac #2
> 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 ;-)