lua-users home
lua-l archive

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

On Nov 21, 2007 3:14 AM, Pixel Pusher <> wrote:
> I imagine that if no __gc metamethods is given to userdata, as you showed,
> the garbage collector never collects the "local" references to that class
> throughout the scripts, is that correct ?

Not correct, full userdata are collected even if they don't have a
__gc. Of course if your userdata holds external resources, you need to
define a __gc finalizer to release them after the userdata itself is

-- Thomas