[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Clarification wrt. lua_newuserdata()
- From: Tim Hill <drtimhill@...>
- Date: Mon, 12 Jan 2015 00:57:40 -0800
> On Jan 12, 2015, at 12:55 AM, Marc Balmer <marc@msys.ch> wrote:
>
> So when my C function that is called from Lau does a "lua_newuserdata()“ followed by by a function that pushes a value on the stack, e.g. "lua_pushinteger(L, 42)“, the stack will contain the userdata object and the number 42 on top. When I return 1, it will return the number value to Lua and the userdata value just below it will eventually be garbage collected, right?
>
> - Marc
>
Correct.
-- Tim