[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: finalizer not called for userdata created inside finalizer
- From: Josh Haberman <jhaberman@...>
- Date: Tue, 10 Apr 2012 17:09:49 -0700
On Tue, Apr 10, 2012 at 4:14 PM, liam mail <liam.list@googlemail.com> wrote:
> I do not see this behaviour on OSX 10.6 for 5.1.4 and 5.2.0, instead I
> see 'Created' and 'GC'd'.
Hmm, that's strange. I was just able to reproduce it on OS 10.7.3
with Lua 5.2 (originally I reproduced it on Linux). Here are the
exact steps I followed:
$ vim ext.c
<paste in the C program I posted>
$ gcc -fpic -shared -o ext.so ext.c -undefined dynamic_lookup
$ vim test.lua
<paste in Lua program I posted>
$ lua test.lua
Created
$ vim test.lua
<remove defer() line and just 'require "ext"' directly>
$ lua test.lua
Created
GC'd
$