lua-users home
lua-l archive

Re: Why table does not have the __gc event?

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


CHU Run-min wrote:
Just now, I found table does't have the __gc event, only userdata has.
But I don't know why.
It's so those that don't understand the consequences of the garbage collector don't get their fingers burnt, at the expense of usability for those who do. You could always patch the Lua source so __gc does get called for tables - that's what I did.
--
Lisa
http://www.thecommune.org.uk/~lisa/

AltStyle によって変換されたページ (->オリジナル) /