From 389a72444be8c8ca8336c3c1353e269d1a30a98f Mon Sep 17 00:00:00 2001 From: _Redstone_c_ Date: Fri, 31 Mar 2023 19:25:50 +0800 Subject: [PATCH] fix(memory): add CDestructible to CAllocatableObject --- Redcraft.Utility/Source/Public/Memory/Allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Redcraft.Utility/Source/Public/Memory/Allocator.h b/Redcraft.Utility/Source/Public/Memory/Allocator.h index e6043f6..4e9cc03 100644 --- a/Redcraft.Utility/Source/Public/Memory/Allocator.h +++ b/Redcraft.Utility/Source/Public/Memory/Allocator.h @@ -13,7 +13,7 @@ NAMESPACE_MODULE_BEGIN(Utility) struct FAllocatorInterface; template -concept CAllocatableObject = CObject && !CConst && !CVolatile; +concept CAllocatableObject = CObject && !CConst && !CVolatile && CDestructible; template concept CAllocator = !CSameAs && CAllocatableObject @@ -63,7 +63,7 @@ struct FAllocatorInterface /** Deallocates storage. */ FORCEINLINE void Deallocate(T* InPtr) = delete; - /** @return true if allocation can be deallocated by another allocator, otherwise false. */ + /** @return true if allocation can be deallocated by another allocator, otherwise false. always return true when bSupportsMultipleAllocation is true. */ NODISCARD FORCEINLINE bool IsTransferable(T* InPtr) const { return true; } /** Calculates the amount of slack to allocate for an array that has just grown to a given number of elements. */