21 <li id="GUID-A0D36B39-ECEB-431A-80FD-6005542F4D7F"><p>Ignore the warnings |
21 <li id="GUID-A0D36B39-ECEB-431A-80FD-6005542F4D7F"><p>Ignore the warnings |
22 generated by the ARM RVCT compiler.</p><note>When you ignore the warnings, |
22 generated by the ARM RVCT compiler.</p><note>When you ignore the warnings, |
23 do not freeze the invalid export entries in the DEF file using the ARM RVCT |
23 do not freeze the invalid export entries in the DEF file using the ARM RVCT |
24 compiler.</note></li> |
24 compiler.</note></li> |
25 </ol></section> |
25 </ol></section> |
26 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-7-1-11-1-1-9-1-6-1-3-2"> <title>Use |
26 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-10-1-12-1-1-9-1-6-1-3-2"> <title>Use |
27 of Global Destructor</title> <p>Symbian does not invoke destructors |
27 of Global Destructor</title> <p>Symbian does not invoke destructors |
28 of global objects upon program termination. For example, in the code below, |
28 of global objects upon program termination. For example, in the code below, |
29 the destructor <codeph>~foo()</codeph> is not called upon program termination. |
29 the destructor <codeph>~foo()</codeph> is not called upon program termination. |
30 At the moment, it is advised not to perform any important operations using |
30 At the moment, it is advised not to perform any important operations using |
31 destructors.</p><codeblock xml:space="preserve">#include |
31 destructors.</p><codeblock xml:space="preserve">#include |
47 { |
47 { |
48 return 0; |
48 return 0; |
49 } |
49 } |
50 |
50 |
51 </codeblock> </section> |
51 </codeblock> </section> |
52 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-7-1-11-1-1-9-1-6-1-3-3"> <title>Issues |
52 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-10-1-12-1-1-9-1-6-1-3-3"> <title>Issues |
53 with <codeph>new</codeph> operator</title> <p>Throwing <codeph>bad_alloc</codeph> or |
53 with <codeph>new</codeph> operator</title> <p>Throwing <codeph>bad_alloc</codeph> or |
54 any object from new on ARMV5 platfrom crashes. RVCT reports an exception when <codeph>new</codeph> throws <codeph>bad_alloc</codeph>. |
54 any object from new on ARMV5 platfrom crashes. RVCT reports an exception when <codeph>new</codeph> throws <codeph>bad_alloc</codeph>. |
55 The problem occurs even if the user throws any object from within an overloaded |
55 The problem occurs even if the user throws any object from within an overloaded |
56 operator <codeph>new</codeph>. The following new signatures are affected:</p><codeblock xml:space="preserve">void *operator new(unsigned int aSize); |
56 operator <codeph>new</codeph>. The following new signatures are affected:</p><codeblock xml:space="preserve">void *operator new(unsigned int aSize); |
57 void *operator new[](unsigned int aSize); |
57 void *operator new[](unsigned int aSize); |
71 </codeblock><p>To implement user owned overloaded version of new, the user |
71 </codeblock><p>To implement user owned overloaded version of new, the user |
72 must implement them as class specific. The other way this could be achieved |
72 must implement them as class specific. The other way this could be achieved |
73 is by defining new similar to:</p><codeblock xml:space="preserve">void* operator new(size_t s,newarg) throw (std::bad_alloc)</codeblock><p>and |
73 is by defining new similar to:</p><codeblock xml:space="preserve">void* operator new(size_t s,newarg) throw (std::bad_alloc)</codeblock><p>and |
74 invoking it as:</p><codeblock xml:space="preserve">Myclass* my = new(S60) Myclass()</codeblock> |
74 invoking it as:</p><codeblock xml:space="preserve">Myclass* my = new(S60) Myclass()</codeblock> |
75 </section> |
75 </section> |
76 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-7-1-11-1-1-9-1-6-1-3-4"> <title>The <codeph>id</codeph> Member |
76 <section id="GUID-DDE6596E-1A67-4219-8822-45A82C39DF0B-GENID-1-10-1-12-1-1-9-1-6-1-3-4"> <title>The <codeph>id</codeph> Member |
77 Issue</title> <p>The <codeph>id</codeph> member variable of facet classes |
77 Issue</title> <p>The <codeph>id</codeph> member variable of facet classes |
78 cannot be accessed directly, it has to be accessed via the <codeph>GetFacetLocaleId()</codeph> interface.</p><p>Following |
78 cannot be accessed directly, it has to be accessed via the <codeph>GetFacetLocaleId()</codeph> interface.</p><p>Following |
79 code snippet is an example that illustrates how to <codeph>uselocale::id</codeph> while |
79 code snippet is an example that illustrates how to <codeph>uselocale::id</codeph> while |
80 writing an application on top of the Standard Template Library (STL). Declare |
80 writing an application on top of the Standard Template Library (STL). Declare |
81 a static method <codeph>GetFacetLocaleId()</codeph> instead of the member |
81 a static method <codeph>GetFacetLocaleId()</codeph> instead of the member |