Re: Making FFI callbacks call free() automatically when it's collected

  • From: Johnson Lin <arch.jslin@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Fri, 20 Jul 2012 15:21:45 +0800

More or less back to the original topic,

When tracking objects(cdata) and their related callbacks in this way,
BE VERY SURE that you don't reference the corresponding object as an
upvalue of some sort in the callback itself. This causes the notorious
cyclic references, and you are doomed. (I just got back from hell.)

best,
Johnson

Other related posts: