Version

menu_open
Wwise SDK 2023.1.2

◆ Reserve()

template<class T , class ARG_T , class TAlloc = ArrayPoolDefault, class TGrowBy = AkGrowByPolicy_DEFAULT, class TMovePolicy = AkAssignmentMovePolicy<T>>
AKRESULT AkArray< T, ARG_T, TAlloc, TGrowBy, TMovePolicy >::Reserve ( AkUInt32  in_ulReserve)
inline

Ensure preallocation of a number of items.

Reserve() won't change the Length() of the array and does nothing if in_ulReserve is smaller or equal to current Reserved() size.

If an allocation occurs, i.e. in_ulReserve > Reserved(), all iterators and all references to the array elements are invalidated.

Note
When template parameter TGrowBy = AkGrowByPolicy_NoGrow, Reserve() shall only be called if the current reserved size is zero. It should normally only be called once on init.
When template parameter TGrowBy = AkGrowByPolicy_Proportional, inappropriate calls to Reserve(), e.g. calling it before every AddLast(), may increase the number of reallocations and result in decreased performance.

Definition at line 529 of file AkArray.h.

Referenced by AkArray< T_MAPSTRUCT *, T_MAPSTRUCT *, ArrayPoolDefault, AkGrowByPolicy_NoGrow >::ReserveExtra().


Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise