[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: lua_pushusertag and object ownership?
- From: lemkef@...
- Date: Sun, 15 Oct 2000 16:22:18 -0000
So far Lua's looking like the best solution for any of my scripting
problems. MUCH easier to implement that Python, and faster from what
I hear. One problem though.
I can't seem to find any information regarding ownership when using
the lua_pushusertag C function. Who owns the other objects (strings
and such) is pretty clearly defined, but I can't find anything
relevant.
My question: When I use lua_pushusertag to call a lua-function with
a pointer to a C++ object, do I have to increment a reference count
so that lua doesn't garbage collect it on me? And when I have an
object in Lua that returns a pointer to a C++ object, will Lua still
own that object also?
If it helps, I'm using 3.2, and tolua.
Thanks!,
Fabian