FFI: __gc for non-structs

  • From: Daurnimator <quae@xxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sat, 26 May 2012 10:24:19 +1000

Hi

I'm wondering what the best way to have a garbage collection callback for
objects that are simply ints (eg, file descriptors)
To my chargrin, tables don't support __gc: so I can't pack values into one.
The only method I see is using dummy structs or newproxy...

Please advise :)

D

Other related posts: