diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-239AA6F5-30CE-5FF0-9C36-93D39FECE1DD.dita --- a/Symbian3/PDK/Source/GUID-239AA6F5-30CE-5FF0-9C36-93D39FECE1DD.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-239AA6F5-30CE-5FF0-9C36-93D39FECE1DD.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,26 +1,26 @@ - - - - - -How -to switch heapsAfter a call to User::SwitchHeap(), any new request -for memory is satisfied from the new heap. -

A thread can switch between heaps using User::SwitchHeap().

-

After a call to this function, any new request for memory is satisfied -from the new heap.

-

When freeing memory, it is extremely important that the current -heap is the heap from which it was allocated. Trying to free a memory cell -from a heap when it was allocated from a different heap has undefined consequences.

-Thing* mything = new Thing; // Allocate on current heap -RHeap* oldHeap = User::SwitchHeap(newHeap);// Change heaps -... // Use new heap -User::SwitchHeap(oldHeap); // Change to old heap -delete mything; // before deleting. + + + + + +How +to switch heapsAfter a call to User::SwitchHeap(), any new request +for memory is satisfied from the new heap. +

A thread can switch between heaps using User::SwitchHeap().

+

After a call to this function, any new request for memory is satisfied +from the new heap.

+

When freeing memory, it is extremely important that the current +heap is the heap from which it was allocated. Trying to free a memory cell +from a heap when it was allocated from a different heap has undefined consequences.

+Thing* mything = new Thing; // Allocate on current heap +RHeap* oldHeap = User::SwitchHeap(newHeap);// Change heaps +... // Use new heap +User::SwitchHeap(oldHeap); // Change to old heap +delete mything; // before deleting.
\ No newline at end of file