[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua garbage collection
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 16 Apr 1997 09:50:25 -0300
I've been looking in the source to see if this is right. I
don't know what Lua does for userdata pointers with GC. Does
it consider different returned userdata with the same exact
value "the same pointer" or "distinct pointers"?
I would be happy if it considered it the same pointer and
would do GC correctly based on this. However, if it dosn't
then just follow the rule above, and you should be fine.
Then you may be happy :-) In Lua 3.0, userdatas with the same exact values
(and tags) are considered the same object, and are GC correctly. That is,
if you get a "gc" fallback for it you can be sure there are no more
instances of this value inside Lua. (Notice that, in 3.0, one can have gc
fallbacks for userdata too).
-- Roberto