Hi All,

Request your help on how to solve the issue in the below code as when i execute the program with -vgc it state as below:

NewTD.d(21): vgc: using closure causes GC allocation
NewTD.d(25): vgc: array literal may cause GC allocation

void logClean (string[] Lglst, int LogAge) {   //Line 21
        if (!Lglst[0].exists) { mkdir(Lglst[0]); }
        auto ct1 = Clock.currTime();
        auto st1 = ct1 + days(-LogAge);
auto dFiles = dirEntries(Lglst[0], SpanMode.shallow).filter!(a => a.exists && a.isFile && a.timeCreated < st1).map!(a =>[a.name]).array; // Line 25
          dFiles.each!(f => f[0].remove);
}

From,
Vino.B

Reply via email to