バージョン

menu_open
Wwise SDK 2023.1.3

◆ 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.

覚え書き
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.

AkArray.h529 行目に定義があります。

参照元 AkArray< T_MAPSTRUCT *, T_MAPSTRUCT *, ArrayPoolDefault, AkGrowByPolicy_NoGrow >::ReserveExtra().


このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう