lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I have an obvious misunderstanding of Lua 4 gc events.
If someone tell me what I am doing wrong I would
greatly appreciate it.

The problem I have is that my userdata is not collected
until Lua terminates. The gc event is not called until
termination but is called as I would expect at termination.

The C code is one Lua function that returns a table
containing other functions.

the Lua code looks like:

atable = myfnc();
atable = nil;
collectgarbage(); -- would expect gc event to be called here

-----------------

The C code looks like:

typedef struct _iodata {