[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Avoiding string duplication
- From: Chris Smith <space.dandy@...>
- Date: Tue, 5 Nov 2019 17:04:15 +0000
> On 5 Nov 2019, at 16:52, Sean Conner <email@example.com> wrote:
> Technically no. References are only valid as long as they're on the
> stack, or there exists a reference elsewhere in the Lua state. Since you
> can't be sure if the string has another reference somewhere (in the general
> case), popping the stack like this removes the reference to the string and
> it could become sugject to garbage collection.
Thanks, that’s what I needed to know. I can guarantee that references will be preserved, so this isn’t an issue.
Chris Smith <firstname.lastname@example.org>