[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Garbage Collector Problem
- From: Richter, Jörg <Joerg.Richter@...>
- Date: Fri, 22 Aug 2014 12:18:36 +0000
> > The Timer() function creates an userdata and stores the callback in a
> > weak-keyed table. The key is the Timer userdata, and the value is the
> > callback. The userdata is returned.
> At this point, unless you store the returned userdata in a variable,
> there is no strong reference to it.
Isn't the returned value a strong reference? It is even used to call a member
function that creates a strong reference in the registry. Is this really different if I
store the result in a local variable?
do
local t = Timer( function() print"timeout end )
t:start(1)
end
- Jörg