I have a long running process that creates a small image (~1-2 kb) and loads it into memory. Because its created using an APK I have to save it to a file before loading it into memory. At that point I no longer need the file. The process can potentially creates many millions of these files.
I am using Visual C++.NET and this is a windows based application. I'd like to know the best way to go about this.
I could delete them as I go, by calling DeleteFile (http://msdn.microsoft.com/en-us/library/aa363915(v=vs.85).aspx) but I wonder if that operation has overhead and if I ought to do it every 10k or 100k files using a wildcard and a naming convention.
Is that worth the effort? Whats the trade offs here?