[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: gc fallback
- From: Alan Watson <alan@...>
- Date: Sun, 8 Jun 1997 21:36:39 -0600
I'm having some problems with the gc fallback. I want to take some
action when tables are collected (in particular, I want to explicitly
free a particular userdata member), but I seem to be unable to index a
table in a gc fallback function without causing unlimited recursion
and, eventually, a core dump. Here's a tiny program that shows this
behaviour:
function gc(table)
if table[nil] then end
end
setfallback("gc", gc)
i = 1
while i <= 1000 do
table = {}
i = i + 1
end
I'd be very grateful for any advice anyone can offer.
Regards,
Alan Watson