I think one question mark is quite enough there Jim :-)
Files that delete themselves? That would be a novelty.
You'll have to write a script that deletes old files, and run it from the crontab (unix only).
or you could incorporate this function into the function that creates a new temp file, so that every time you create a new temp file, any old files are deleted.