版本

    其他文档

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.

注解
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 之旅