lua-users home
lua-l archive

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


> So far it does the job but I'm not sure if there is any memory
> leakage.  The manual says it will free all memory associated with the
> state but does it include those locked in COM and OLE?  In comparison,
> the php manual explicitly says that an exit() will free all memory and
> object destructors will always be executed. [...]

I am not sure what you are saying, but the Lua manual also states that
lua_close will execute all object destructors:

  http://www.lua.org/manual/5.1/manual.html#lua_close

  Destroys all objects in the given Lua state (calling the corresponding
  garbage-collection metamethods, if any) and frees all dynamic memory
  used by this state.

-- Roberto