Symbian3/PDK/Source/GUID-1FC0156C-7BDB-5D5B-9860-837DAB431D24.dita
changeset 5 f345bda72bc4
parent 3 46218c8b8afa
child 14 578be2adaf3e
--- a/Symbian3/PDK/Source/GUID-1FC0156C-7BDB-5D5B-9860-837DAB431D24.dita	Tue Mar 30 11:42:04 2010 +0100
+++ b/Symbian3/PDK/Source/GUID-1FC0156C-7BDB-5D5B-9860-837DAB431D24.dita	Tue Mar 30 11:56:28 2010 +0100
@@ -1,26 +1,32 @@
-<?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-1FC0156C-7BDB-5D5B-9860-837DAB431D24"><title>How to implement and use NewLC()</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>When an object is created through <codeph>NewLC()</codeph>, use <codeph>CleanupStack::PopAndDestroy()</codeph> to destroy the object when its use is complete.</p> <codeblock id="GUID-34A7790B-1FA9-58FA-83D9-A2CF6C07F2F2" xml:space="preserve">static CExample* CExample::NewLC()
-    {
-    CExample* self = new (ELeave) CExample();
-    CleanupStack::PushL(self);
-    self-&gt;ConstructL();
-    return self;
-    }</codeblock> <codeblock id="GUID-421A377A-7192-5908-A1C6-E3941046D489" xml:space="preserve">void doExampleL()
-    {
-    // allocate and push to cleanup stack - leave if failed
-    CExample* myExample = CExample::NewLC();
-    // do something that might leave
-    myExample-&gt;DoSomethingL();  
-    // pop from cleanup stack and destroy
-    CleanupStack::PopAndDestroy(); 
-    }</codeblock> </conbody></concept>
\ No newline at end of file
+<?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 id="GUID-1FC0156C-7BDB-5D5B-9860-837DAB431D24" xml:lang="en"><title>How to
+implement and use NewLC()</title><shortdesc>This document describes how to destroy objects created with <codeph>NewLC()</codeph>.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
+<p>When an object is created through <codeph>NewLC()</codeph>, use <codeph>CleanupStack::PopAndDestroy()</codeph> to
+destroy the object when its use is complete.</p>
+<codeblock id="GUID-34A7790B-1FA9-58FA-83D9-A2CF6C07F2F2" xml:space="preserve">static CExample* CExample::NewLC()
+    {
+    CExample* self = new (ELeave) CExample();
+    CleanupStack::PushL(self);
+    self-&gt;ConstructL();
+    return self;
+    }</codeblock>
+<codeblock id="GUID-421A377A-7192-5908-A1C6-E3941046D489" xml:space="preserve">void doExampleL()
+    {
+    // allocate and push to cleanup stack - leave if failed
+    CExample* myExample = CExample::NewLC();
+    // do something that might leave
+    myExample-&gt;DoSomethingL();  
+    // pop from cleanup stack and destroy
+    CleanupStack::PopAndDestroy(); 
+    }</codeblock>
+</conbody></concept>
\ No newline at end of file