[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Replacement for unlocked refs?
- From: Diego Nehab <diego@...>
- Date: Fri, 1 Feb 2002 16:41:54 -0200 (EDT)
> How do you pass your userdata object into Lua calls? That is, say I
> have C++ code that wants to call a function like:
> int doSomething(MyObject* obj);
Now you caught me... What you would like to have is strong ref to the
C++ object stored in it. But that would kill garbage collection because
of the cycle. I agree that here a weak ref would be greatly appreciated
Using lua_pushuserdatabox too much might become a problem. I will try to
find an elegant solution and post it if I find it.