[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C API question
- From: "Jérôme Vuarand" <jerome.vuarand@...>
- Date: Sat, 22 Sep 2007 01:24:12 -0400
2007/9/21, David Burgess <email@example.com>:
> If I create a metatable (lua_createtable()) and use lua_setmetable()
> to associate the metatable with a table and do not put the metatable
> in the registry with luaL_newmetatble(), am I right in thinking that
> because the metatable is is referenced by the table that the metatable
> will not be collected?
> And when I delete the table, the metatable will be collected because
> it is no longer referenced?
Yes. Being the metatable of another object prevent a table from being collected.