Re: cdata upvalue and garbage collection
- From: Shmuel Zeigerman <shmuz@xxxxxxxxxx>
- To: luajit@xxxxxxxxxxxxx
- Date: Mon, 03 Oct 2016 18:18:46 +0300
On 03/10/2016 14:56, Nick Zavaritsky wrote:
Yes, this is normal behaviour. GC is oblivious to pointers embedded in cdata
objects.
Also please note, if you do ffi.cast, and then let the original cdata perish,
you get a dangling pointer.
Thanks Nick. (For some unknown reason I was sure that being an upvalue
is enough to escape from the GC).
--
Shmuel
Other related posts: