wxArrayString new_oldName; wxFile f; wxString tname = wxFileName::CreateTempFileName("", &f); int cutoff = wxFileModificationTime(tname) - 60*60*4; f.Close(); ::wxRemoveFile(tname);  for(int i = 0; i < oldName.Count() ; ++i)
wxArrayString new_oldName; wxFile f; wxString tname = wxFileName::CreateTempFileName("", &f); int cutoff = wxFileModificationTime(tname) - 60*60*4; f.Close(); ::wxRemoveFile(tname);  for(unsigned int i = 0; i < oldName.Count() ; ++i)
    static void CleanupCheck()    {        wxArrayString new_oldName;        wxFile f;        wxString tname = wxFileName::CreateTempFileName("", &f);        int cutoff = wxFileModificationTime(tname) - 60*60*4; // files older than 4 hours        f.Close();        ::wxRemoveFile(tname);                for(int i = 0; i < oldName.Count() ; ++i)        {            if(::wxFileExists(oldName[i]) && wxFileModificationTime(oldName[i]) < cutoff )                ::wxRemoveFile(oldName[i]);            else                new_oldName.Add(oldName[i]);        }        oldName = new_oldName;    };