diff -r 48780e181b38 -r 578be2adaf3e Symbian3/PDK/Source/GUID-DD3411FE-D95B-5153-8C90-442618920E20.dita --- a/Symbian3/PDK/Source/GUID-DD3411FE-D95B-5153-8C90-442618920E20.dita Tue Jul 20 12:00:49 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-DD3411FE-D95B-5153-8C90-442618920E20.dita Fri Aug 13 16:47:46 2010 +0100 @@ -1,32 +1,32 @@ - - - - - -How -to reserve space in a fixed flat arrayTo be sure that there is sufficient space available to add new -elements to a fixed flat array, you can use the SetReserveL() function -to pre-allocate memory. -

When adding elements to a flat array of elements having the same length -(a CArrayFixFlat<class T> type) the array buffer may be -re-allocated to accommodate the extra elements. This can fail for lack of -memory.

-

If it is important to guarantee that the process of inserting elements -cannot fail at the time of insertion, then the necessary space in the array -buffer should be reserved in advance. This allows any out of memory situation -to be handled before starting to add elements to the array.

-

SetReserveL() reserves sufficient space to accommodate -the required number of elements, in this case ten.

-CArrayFixFlat<TElement>* fixflat; -fixflat = new (ELeave) CArrayFixFlat<TElement>(3); -... -fixflat->SetReserveL(10); -

If the array already contains five elements, then another five elements -can be added to the array and be guaranteed not to fail for lack of memory.

+ + + + + +How +to reserve space in a fixed flat arrayTo be sure that there is sufficient space available to add new +elements to a fixed flat array, you can use the SetReserveL() function +to pre-allocate memory. +

When adding elements to a flat array of elements having the same length +(a CArrayFixFlat<class T> type) the array buffer may be +re-allocated to accommodate the extra elements. This can fail for lack of +memory.

+

If it is important to guarantee that the process of inserting elements +cannot fail at the time of insertion, then the necessary space in the array +buffer should be reserved in advance. This allows any out of memory situation +to be handled before starting to add elements to the array.

+

SetReserveL() reserves sufficient space to accommodate +the required number of elements, in this case ten.

+CArrayFixFlat<TElement>* fixflat; +fixflat = new (ELeave) CArrayFixFlat<TElement>(3); +... +fixflat->SetReserveL(10); +

If the array already contains five elements, then another five elements +can be added to the array and be guaranteed not to fail for lack of memory.

\ No newline at end of file