lua-users home
lua-l archive

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

On Fri, Jun 10, 2011 at 9:55 AM, steve donovan
<> wrote:
> On Fri, Jun 10, 2011 at 10:42 AM, Reuben Thomas <> wrote:
>> You can get away with it for a short time under normal circumstances,
>> i.e. when there's no GC before you use the string, but it will bite
>> you in the end!
> So presumably you can get away with it if you explicitly create a
> reference to the string with luaL_ref?
> Then of course you need to know when to release that reference.

I interpret the manual to mean that should a Lua implementation use a
moving GC, it is only required to fix the address of strings while
they live on the stack, and is free to move them around once they are
off the stack.