[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Garbage collection vs. userdata
- From: "Peter Harris" <lua@...>
- Date: Thu, 4 Dec 2008 10:45:43 -0500
On Thu, Dec 4, 2008 at 10:15 AM, "O. Wölfelschneider" wrote:
> However, if I allocate something using lua_newuserdata(), will the pointer
> be constant over its lifetime?
Yes.
> I fear the GC might like to move userdata around in memory during sweeps?
The Lua 5.x GC is not a compacting collector, so userdata will not
move once allocated.
Peter Harris