lua-users home
lua-l archive

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

The environment table makes it possible to have C-based objects that
reference Lua objects and are in turn referenced by Lua objects. Going
through the ref mechanism in earlier versions of Lua was prone to creating
uncollectable cycles. With the new functionality in Lua 5.1 the garbage
collector can do a full trace and we don't have extraneous anchors in the

I think this would probably be clearer and easier to explain if Rici's
proposals were adopted.


on 8/24/05 7:53 AM, Chris Marrin at wrote:

> After reading all this I am still confused about what the environment
> table in a userdata does. Is it just a place to store a table that can
> be retrieved and manipulated, or does it actually come to play in some
> API calls somewhere? As I mentioned, I don't see it being used anywhere
> in the 5.1 API. Sorry about being dense, but I really think this will
> solve a lot of problems for me, so I really want to understand it well.