60 11</codeph>) occurs. </p><p><b>Related APIs</b></p><ul> |
60 11</codeph>) occurs. </p><p><b>Related APIs</b></p><ul> |
61 <li><p><xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E69BAB5A-EFC1-3700-8B56-9A5876BF428D"><apiname>RBuf::Create(const TDesC8&)</apiname></xref></p></li> |
61 <li><p><xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E69BAB5A-EFC1-3700-8B56-9A5876BF428D"><apiname>RBuf::Create(const TDesC8&)</apiname></xref></p></li> |
62 <li><p><xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E396F6CA-1353-31E3-8AFF-BAFE2DF6E0E7"><apiname>RBuf::Swap(RBuf8&)</apiname></xref></p></li> |
62 <li><p><xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E396F6CA-1353-31E3-8AFF-BAFE2DF6E0E7"><apiname>RBuf::Swap(RBuf8&)</apiname></xref></p></li> |
63 </ul> <p id="GUID-893B2BF3-AD9F-587D-95D5-165014C932B4"><b>Copying |
63 </ul> <p id="GUID-893B2BF3-AD9F-587D-95D5-165014C932B4"><b>Copying |
64 data to an RBuf using the assignment operator</b> </p> <p>The example |
64 data to an RBuf using the assignment operator</b> </p> <p>The example |
65 creates two resizable buffers and allocates memory using <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E69BAB5A-EFC1-3700-8B56-9A5876BF428D"><apiname>RBuf::Create(const TDesC8&)</apiname></xref>. It then copies |
65 creates two resizable buffers and allocates memory using <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-E69BAB5A-EFC1-3700-8B56-9A5876BF428D"><apiname>RBuf::Create(const TDesC8&)</apiname></xref>. It then copies data to |
66 data to these buffers. It also copies data from the first buffer to |
66 these buffers. It also copies data from the first buffer to the second |
67 the second buffer using the assignment operator. </p> <p> <b> Notes:</b> </p> <ul> |
67 buffer using the assignment operator. </p> <p> <b> Notes:</b> </p> <ul> |
68 <li id="GUID-9B2835F9-BD3E-56DD-9CFD-F71677FFC71C"><p>When you use <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-9B5FF0B6-9C38-3E74-A5BC-A5CB02E029B7"><apiname>RBuf::Assign(const RBuf8&)</apiname></xref>, ownership of the buffer |
68 <li id="GUID-9B2835F9-BD3E-56DD-9CFD-F71677FFC71C"><p>When you use <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-9B5FF0B6-9C38-3E74-A5BC-A5CB02E029B7"><apiname>RBuf::Assign(const RBuf8&)</apiname></xref>, ownership of the buffer |
69 is transferred. <codeph>Assign(const RBuf8&)</codeph> neither |
69 is transferred. <codeph>Assign(const RBuf8&)</codeph> neither |
70 checks nor frees any pre-existing owned allocated memory. If this |
70 checks nor frees any pre-existing owned allocated memory. If this |
71 descriptor already owns some allocated memory, <xref href="GUID-BEFF9C91-DA64-3032-96E8-F5054405DC74.dita#GUID-BEFF9C91-DA64-3032-96E8-F5054405DC74/GUID-32EB41B6-A1C8-326C-9D52-095B05D4D20B"><apiname>RBuf16::Close()</apiname></xref> should be invoked on it before calling <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-9B5FF0B6-9C38-3E74-A5BC-A5CB02E029B7"><apiname>RBuf::Assign(const |
71 descriptor already owns some allocated memory, <xref href="GUID-BEFF9C91-DA64-3032-96E8-F5054405DC74.dita#GUID-BEFF9C91-DA64-3032-96E8-F5054405DC74/GUID-32EB41B6-A1C8-326C-9D52-095B05D4D20B"><apiname>RBuf16::Close()</apiname></xref> should be invoked on it before calling <xref href="GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8.dita#GUID-BFBC574B-EFF6-37A4-9189-B71DA1505BC8/GUID-9B5FF0B6-9C38-3E74-A5BC-A5CB02E029B7"><apiname>RBuf::Assign(const |
72 RBuf8&)</apiname></xref>, otherwise a memory leak will occur. </p> </li> |
72 RBuf8&)</apiname></xref>, otherwise a memory leak will occur. </p> </li> |
106 of a stream to a file.</p></li> |
106 of a stream to a file.</p></li> |
107 <li><p><xref href="GUID-90A3AE1D-DCB2-3E98-8BE9-C48C15964E7D.dita"><apiname>RFileReadStream</apiname></xref> - Supports the reading of |
107 <li><p><xref href="GUID-90A3AE1D-DCB2-3E98-8BE9-C48C15964E7D.dita"><apiname>RFileReadStream</apiname></xref> - Supports the reading of |
108 a stream from a file.</p></li> |
108 a stream from a file.</p></li> |
109 <li><p><xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref></p></li> |
109 <li><p><xref href="GUID-E263C747-946F-35AA-9F1D-41833BD350FC.dita"><apiname>RFs</apiname></xref></p></li> |
110 </ul></section> |
110 </ul></section> |
111 <section id="GUID-111B7B66-A3C4-5A15-8CF2-C6A227483651"><title>Build</title> <p>The <xref href="GUID-3100800B-B2F7-50EF-BD4C-3C345ECCB2A5.dita">Symbian |
111 <section id="GUID-111B7B66-A3C4-5A15-8CF2-C6A227483651"><title>Build</title> <p> The example builds an executable file called <filepath>rbufexample.exe</filepath> in the standard location (<filepath>\epoc32\release\winscw\<build_variant></filepath> for the emulator). After launching the executable, depending on |
112 build process</xref> describes how to build this example application. |
|
113 The example builds an executable file called <filepath>rbufexample.exe</filepath> in the standard location (<filepath>\epoc32\release\winscw\<build_variant></filepath> for the emulator). After launching the executable, depending on |
|
114 the emulator you are using, you may need to navigate away from the |
112 the emulator you are using, you may need to navigate away from the |
115 application launcher/shell screen to view the console. </p> </section> |
113 application launcher/shell screen to view the console. </p> </section> |
116 <section id="GUID-E30CC1D4-B854-5080-8F37-950CA4D86DD0"><title>See |
114 <section id="GUID-E30CC1D4-B854-5080-8F37-950CA4D86DD0"><title>See |
117 also</title> <p> <xref href="GUID-4AC3CC42-6E8D-584A-AA39-84B5E0F3C16A.dita">How to use the resizable buffer descriptor - RBuf</xref> </p> </section> |
115 also</title> <p> <xref href="GUID-4AC3CC42-6E8D-584A-AA39-84B5E0F3C16A.dita">How to use the resizable buffer descriptor - RBuf</xref> </p> </section> |
118 </conbody></concept> |
116 </conbody></concept> |