This topic describes how a temporary file can be destroyed automatically when the owning thread closes it or if the owning thread crashes.
Set EDeleteOnClose when opening a temporary file to enable the automatic deletion on closure. EDeleteOnClose can be used with RFile::Temp() and RFile::Create(). For example:
r = file.Create(TheFs, filename, EFileShareAny | EFileRead | EFileWrite | EDeleteOnClose);
The purpose of this flag is to prevent memory leaks when components that create temporary files crash.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.