Re: When to call GC.{add,remove}Range in containers?

2016-10-10 Thread Nordlöw via Digitalmars-d-learn
On Monday, 10 October 2016 at 08:26:45 UTC, Kagamin wrote: On Monday, 10 October 2016 at 07:12:10 UTC, Nordlöw wrote: should not be scanned by the GC. Shouldn't be a problem. What do you mean? I'm talking about an optimization; don't call addRange when we don't need to, because the interna

Re: When to call GC.{add,remove}Range in containers?

2016-10-10 Thread Kagamin via Digitalmars-d-learn
On Monday, 10 October 2016 at 07:12:10 UTC, Nordlöw wrote: should not be scanned by the GC. Shouldn't be a problem.

When to call GC.{add,remove}Range in containers?

2016-10-10 Thread Nordlöw via Digitalmars-d-learn
Which std.trait should be used to statically check whether I should call GC.{add,remove}Range on the elements of D containers? `std.container.array.Array` currently uses `hasIndirections` but a comment on the same line says it should use `hasPointers` instead. containers-em uses template sh