Using closure causes GC allocation

Vino.B via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 2 13:54:03 PDT 2017


On Saturday, 2 September 2017 at 20:10:58 UTC, Moritz Maxeiner 
wrote:
> On Saturday, 2 September 2017 at 18:59:30 UTC, Vino.B wrote:
>> [...]
>
> Cannot reproduce under Linux with dmd 2.076.0 (with commented 
> out Windows-only check). I'll try to see what happens on 
> Windows once I have a VM setup.
>
>> [...]
>
> You changed the type of dFiles, which you return from 
> cleanFiles, without changing the return type of cleanFiles. 
> Change the return type of cleanFiles to the type the compiler 
> error above tells you it should be (`Tuple!(string, string)[]` 
> instead of `string[][]`), or let the compiler infer it via auto 
> (`auto cleanFiles(...`).

Hi,

  Thank you very much, was able to resolve the second code issue 
by changing the return type of the function.


More information about the Digitalmars-d-learn mailing list