lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Does anyone know the answers?


On Sun, 30 May 1999, Russell Y Webb wrote:

> I'm working on some C++ interfaces to lua and have run into a couple of 
> questions:
> 1.  If lua_ref(true) is called multiple times on the same lua object,  
> is the object only freed when that many lua_unrefs are called? 
> 2.  Can you lua_ref(true) an object with no name:
> 	lua_pushstring("this is a nameless object on the stack");
> 	ref = lua_ref(true);
> Where does such an object live?  Can you get to it from within lua?
> Note: lock has to be true in this case since lua definitely does not have 
> a reference to the string object (right?).
> Thanks,
> Russ