The TempFile class aims to provide a safe way of creating and destroying temporary files. The TempFile class will automatically close temporary files when the object is destroyed, so it is recommended that you make appropriate use of scoped destruction.