gcfn create the finalizer object.
luarocks install gcfn
local gcfn = require('gcfn')
-- create new gcfn object
local gco = gcfn(function(...)
print(...)
end, 'a', 'b', 'c' )
gco = nil
collectgarbage('collect')
print('done')create a new gc fucntion object.
Parameters
fn:function: a function to execute when GC occurs....:: arguments of function
Returns
gco:gcfn: gcfn object.
disable the invocation of GC function.
enable the invocation of GC function.
sets the error function to be called when the GC function fails.
Parameters
fn:function: a function....:: arguments of function.
NOTE
The error object err is passed afterthe the arguments ....