[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Do strings move around?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 25 Aug 2020 16:05:17 -0300
> > > It seems likely, and it is true on userdata, but the wording on
> > > lua_tostring make me fear the string can me moved around by the
> > > collector if it is not pinned especifically by a stack entry.
> > I think the docs are quite clear; your fear is intentional.
> By "intentional" do you mean "justified" ? I'm not quite sure I
> understand that part.
By intentional I meant intentional. The intention of the docs is exactly
to instil this fear that "the string can [be] moved around by the
collector". (Well, the intention is to instil that concept; if it causes
fear, so be it.)