lua-users home
lua-l archive

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


Nicolas Noble wrote:
  I've been messing around with LUA since a few weeks now, and I'm
wondering something. How exactly does the __gc metamethod works ? It just
seems I'm not using it the right way. Look, if I use this piece of code:

This one is thankfully easy to answer -- the __gc function has to
be a C function, not a lua function (though perversely, the
C function can then call a lua function if it likes).

Regards,
--Adam
--
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
Consume Less, Live More