[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: When will userdate be freed/gced?
- From: Marc Balmer <marc@...>
- Date: Sun, 7 Apr 2019 12:33:07 +0200
In a C function that is called from Lua, I use the following idiom:
s = lua_newuserdata(L, 128);
After this function returns, what happens to the userdata? Will it be garbage collected eventually or do I have to free() the pointer returned by lua_newuserdata()? How does Lua "know" when the userdata is no longer used?