Do you use D's GC?
Ali Çehreli
acehreli at yahoo.com
Tue Aug 3 18:31:59 UTC 2021
On 8/3/21 11:18 AM, Steven Schveighoffer wrote:
> In order for a length change to *not* reallocate, you have to call
> `assumeSafeAppend` on that adjusted buffer, to let the runtime know that
> we don't care about any existing data that might be referenced by others.
Makes sense. Yes, I use assumeSafeAppend mostly on function-local-static
buffers. (Similarly, Appender.clear() for appenders.)
Ali
More information about the Digitalmars-d
mailing list