[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua/C++ bidirection free
- From: "Wesley Smith" <wesley.hoke@...>
- Date: Wed, 14 Feb 2007 22:32:10 -0800
Hi Collective Wisdom,
I'm struggling with a design issue in integrating Lua into a C++
library. The way the library is designed, the destructor of an object
can create a cascade of destructor calls some of which could
potentially be resources referred to in Lua. The problem I'm trying
to solve right now is how to manage freeing userdata in Lua once a C++
object having nothing to do with Lua destroys it. Are there idioms
people use for dealing with this kind of thing?
thanks,
wes