[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: tolua, c++, garbagecollection and memory management
- From: "Sebby " <beast@...>
- Date: Fri, 12 Jan 2001 03:27:56 -0000
This could easily be done with a C++ functor template to define the
stub functions. Here is a link to an example of functors
--- In firstname.lastname@example.org, James Hearn <james.hearn@b...> wrote:
> Christian Vogler wrote:
> > On Thu, Jan 11, 2001 at 02:50:14PM -0200, Waldemar Celes wrote:
> > > no, it won't be collected. objects created with "new" should be
> > > explicitly deleted with "delete". or you may call the function
> > > "takeownership" to tell tolua to collect it when it leaves the
> > > scope.
> > I wrote some meta-code that makes this somewhat easier.
> > you define a class A, it lets you do the following:
> > uncollected_instance = A:new(blah ...)
> > collected_instance = A(blah ...)
> > The first syntax does not take ownership, while the second one
> > does. Siome and I find this pretty convenient in our project. If
> > anyone is interested, e-mail me, and I will make it available.
> > I also have a whole bunch of tips and tricks for generating good
> > bindings with tolua. Trouble is only, they all pertain to tolua
> > and I'm not sure how many of them are still valid for tolua 4.0.
> > again, if anyone is interested, I will be happy to share them.
> > - Christian
> I would be very interested in hearing your tips. I'm about to bind
> game-windowing toolkit to lua, and any info would be helpful.
> --James Hearn