[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Table garbage collection
- From: Milind Gupta <milind.gupta@...>
- Date: Tue, 14 Jul 2020 11:16:03 -0700
Thank you very much! This was very helpful.
I was working on something similar to a thing that could be used to
answer this question, so I made it into a thing that could be used to
answer this question. See here:
In your case, you can call paths.get_paths(function() return
my_weak_table[my_key] end) to get a list of paths from a few starting
points. It takes a function like this to avoid creating extra
references to the thing, which would then be found by get_paths,
adding some noise to the output.
On Tue, Jul 14, 2020 at 11:01 AM Milind Gupta <email@example.com> wrote:
> I am trying to debug a situation where I have a table A referred to in a weak value table B and also in another data structure C. I then delete A from the data structure C. I then run collectgarbage(). Now I am expecting table A to disappear from table B but it is still there.
> So it means that A is also somewhere else. Is there a way to see which references are preventing A from being garbage collected?