Do you use D's GC?

jfondren julian.fondren at gmail.com
Tue Aug 3 19:24:10 UTC 2021


On Tuesday, 3 August 2021 at 19:19:46 UTC, Steven Schveighoffer 
wrote:
> The allocation doesn't happen on the shrinking, it happens on 
> the regrowing.

Aye, I had some kind of sleep deprivation mental block on this 
function getting called repeatedly for the same buffer with 
different lengths. Imagine, instead, 10k separate buffers and a 
_single_ call of this function on each with a random length. In 
this case the reallocating calls would be the same with/without 
the fix.


More information about the Digitalmars-d mailing list