lua-users home
lua-l archive

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


This only works for userdata objects as only the host application would know how do collect them. Tables are native Lua objects and thus don't need any help from things like __gc event.
Alex

 -----Original Message-----
From: 	Peter Loveday [mailto:peter@eyeonline.com] 
Sent:	Tuesday, April 29, 2003 4:57 PM
To:	Multiple recipients of list
Subject:	Re: tables and the gc

>         luaobj = {}
>         luaobj.__resource = rawConnectInC(name)
>         setmetatable(luaobj, {__gc = destroyResource}

Do __gc methods actually work for tables these days?  Last time I tried I
couldn't get it to... seemed like a fairly serious problem.

Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software