[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: user data not allocated by lua
- From: Javier Guerra Giraldez <javier@...>
- Date: Mon, 21 Jul 2014 12:10:49 -0500
On Mon, Jul 21, 2014 at 11:27 AM, Coda Highland <chighland@gmail.com> wrote:
> You could also allocate a tiny
> pointer-sized userdata and then use its __gc metamethod to free the
> original data block.
while that works and is very common, keep in mind that Lua will only
'see' very tiny objects; if you allocate a lot of big objects you can
consume a lot of memory and the Lua GC might not bother to collect
those 'tiny' objects.
--
Javier