Symbian3/SDK/Source/GUID-F86CFD79-88B1-55E0-AF81-4666D97B7AF5.dita
changeset 0 89d6a7a84779
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-F86CFD79-88B1-55E0-AF81-4666D97B7AF5.dita	Thu Jan 21 18:18:20 2010 +0000
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE concept
+  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
+<concept xml:lang="en" id="GUID-F86CFD79-88B1-55E0-AF81-4666D97B7AF5"><title>Automatic file deletion on closure</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A temporary file can be destroyed automatically when the owning thread closes it or if the owning thread crashes. </p> <p>Set <codeph>EDeleteOnClose</codeph> when opening a temporary file to enable the automatic deletion on closure. <codeph>EDeleteOnClose</codeph> can be used with <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita#GUID-BE0804F6-4375-3C8A-8C83-968F510466E0/GUID-87D0C77C-CC63-3D70-BACE-3C5EE702BD37"><apiname>RFile::Temp()</apiname></xref> and <xref href="GUID-BE0804F6-4375-3C8A-8C83-968F510466E0.dita#GUID-BE0804F6-4375-3C8A-8C83-968F510466E0/GUID-1EB4AA8F-9363-3EC5-8AE2-1F70F15FCF15"><apiname>RFile::Create()</apiname></xref>. For example: </p> <codeblock id="GUID-F74D3314-7C59-5350-913F-D38AED696799" xml:space="preserve">r = file.Create(TheFs, filename, EFileShareAny | EFileRead | EFileWrite | EDeleteOnClose);</codeblock> <p>The purpose of this flag is to prevent memory leaks when components that create temporary files crash. </p> <section><title>Notes</title> <ul><li id="GUID-BFA882BB-D312-5FBB-906F-5B27A6B4507D"><p>Existing files cannot be opened with <codeph>EDeleteOnClose</codeph> set. Any attempts to do this will return the error message <codeph>KErrArgument</codeph>. </p> </li> <li id="GUID-CA76B615-62CE-59E5-B1D8-B0628728D7C6"><p>Automatic file deletion is not default behaviour. </p> </li> </ul> </section> </conbody></concept>
\ No newline at end of file