[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Trying to implement new type in Lua patch, ending up with memory leaks - advice?
- From: bil til <biltil52@...>
- Date: Sat, 1 Oct 2022 21:58:56 +0200
> I'm working on a patched version of Lua 5.1 that adds a new "rope" subtype to strings, which allows
> postponing allocating and building concatenation operations until the final string's actually required.
Can you give an example how the Lua user should later best invoke your
new "rope" type, that I can get a more clear understanding what you
really want to do?
I think usually customized value types should be included in Lua as
metatables, see e. g. the bitarray example in "Programming In Lua" by
... if you change the Lua code as deeply as in your github examples,
especially if you include new types, I really would be surprised if
you would NOT run into memory problems... except if you are some
extremely experienced in modifying Lua... .