[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is this possible? (garbage collect and weak tables)
- From: "Alex Davies" <alex.mania@...>
- Date: Fri, 6 Nov 2009 20:16:25 +0800
Ignacio Burgueño wrote:
Line 20 is the second line in the code above marked with an arrow.
I guess that is possible that the GC kicks in between both marked lines,
so the table I put in the weak table went away, right?
Right, easily possible - particularly if i18nlib.Translator makes a lot of
allocations. Easy enough to fix though, just save translators[key] to a
local variable and restore it after the i18nlib call.