shared array?
Prudence via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Sep 11 07:47:14 PDT 2015
On Friday, 11 September 2015 at 13:12:14 UTC, Adam D. Ruppe wrote:
> On Friday, 11 September 2015 at 04:28:52 UTC, Prudence wrote:
>> I thought about that but then I have to rely on the GC for
>> some simple things. Doesn't seem like the right way to go.
>
> Since it is static, it will never be collected anyway, so you
> could just use it and it'll work for convenience and probably
> lose nothing, or very trivially write an append function that
> uses any scheme you want instead of doing ~= on it without even
> worrying about freeing it.
And that makes it worse!! If it's never collected and the GC
scans it every time, it means it adds a constant overhead to the
GC for absolutely no reason, right? It also then makes every
dependency on it GC dependent(@nogc can't be used)? It just seems
like it's the wrong way to go about it.
More information about the Digitalmars-d-learn
mailing list