[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: simple question
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 05 Sep 2002 09:17:05 -0300
> You can also ensure that it doesn't get garbage collected by getting a
> reference to the string, using lua_ref.
Even then, you should not keep the "char *" yourself. Although this
works now, it is not officially supported by Lua. If you use lua_ref,
you should use lua_getref to retrieve the string when you need.
(Eventually we may want the freedom to move the string when it is not
being used by C; that is, it is not in the stack of a C function.)