Re: externalstring and to-be-closed

Sergey Zakharchenko <[email protected]>
Newsgroups gmane.comp.lang.lua.general
Message-ID <CADYCxoOmcRsS3DBKHucpu5REycpQ8MkXA7S_B=JA_fe6NyvEjQ@mail.gmail.com>
Hello Marc,

On Fri, Feb 6, 2026, 17:34 Marc Balmer <[email protected]> wrote:

> Trying to better understand external strings…
>
> Can external strings, pushed to a Lua state using
> lua_pushexternalstring(), somehow be marked as to-be-closed (<close> in
> Lua) so that  the allocf function passed to lua_pushexternalstring() gets
> called when the variable goes out of scope and not only at garbage
> collection time?


A similar suggestion was discussed in July and it looks impossible without
seriuosly changing string semantics.

Best regards,

-- 
DoubleF

-- 
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/lua-l/CADYCxoOmcRsS3DBKHucpu5REycpQ8MkXA7S_B%3DJA_fe6NyvEjQ%40mail.gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.