lua-users home
lua-l archive

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


2010/4/13 bravefly <bravefly@gmail.com>
>
> Dear everybody:
> I use lua on an embeded device, the memory is only 400KB. My engine exec lua files one after one.
> And now , I do close & open lua_State to release the memory after every execution of a lua file. It's so slow.
> Is there a good idea about releasing the memory used by previous lua execution which don't need to close
> lua state ?
>

You do not need to close the state between running each file.
Just loadfile the next one after the current has completed.

Daurn

PS, please don't have such a big signature (and plain text mail is prefered)