[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Clarification wrt. lua_newuserdata()
- From: Marc Balmer <marc@...>
- Date: Mon, 12 Jan 2015 09:55:34 +0100
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?