lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> There's always the venerable printf technique. Add or modify a __gc handler
> to suspect userdata and tables which prints a debug message on finalization.

It is generally easy to keep a count of the objects you allocate and
find what is still alive.  What's harder is finding out _why_ it is
still alive when you expected it to be collected.  The most usual case
for me has been explicit references in the registry as you say but
still I was thinking that if a general-purpose tool could be created
that would somehow help you get a picture of the lua state and what's
keeping what alive.