[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: HELP - leak in lua 5.0.3
- From: "Adam D. Moss" <adam@...>
- Date: Wed, 12 Jul 2006 17:37:26 +0100
Sorry, no insights into this leak specifically, but it
does bring up a possible suggestion for Lua 5.2 (or 6.0,
or whatever) - the ability to programatically walk or otherwise
instrument the not-dead object set in a similar manner to how the
GC does. One of my largest time-sinks in debugging Lua programs
has been trying to discover:
(1) what objects are not being GC'd when I think their lifetime
'should' be over, and
(2) 'who' is holding the unexpected references keeping those
objects alive.
I investigate (1) by adding destructor methods to suspected classes
(p.s. __dtor on tables is useful for this reason even if the other
uses for it are considered unnecessary :)) which print something
like 'blah blah is dying now!' and note the conspicuous absence of
such output, or maintain a refcount-by-object-type in the ctor/dtor
pair which I can monitor for imbalance. I haven't devised a great
way to debug (2) except by inspection.
Cheers,
--Adam