[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: weak tables
- From: Roberto Ierusalimschy <rieru@...>
- Date: Wed, 9 Jan 2002 15:06:12 -0600 (CST)
On Wed, 9 Jan 2002, Ignacio Castaño wrote:
> Could someone explain the difference between tables with 'weak keys', 'weak
> values' and both?
Consider the following table:
a = {
[{}] = 10,
[20] = {},
}
If a has weak keys, only the first entry will be removed in a GC cicle.
If a has weak values, only the second entry will be removed in a GC cicle.
If a has both weaks, both entries will be removed.
-- Roberto