Optimize dynamic memory allocations for managed runtime interop collections with a new Arena Allocation
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Collections/Array.h"
|
||||
#include "Engine/Core/Memory/ArenaAllocation.h"
|
||||
#include "MTypes.h"
|
||||
|
||||
/// <summary>
|
||||
@@ -32,7 +33,7 @@ protected:
|
||||
mutable int32 _hasCachedAttributes : 1;
|
||||
int32 _isStatic : 1;
|
||||
|
||||
mutable Array<MObject*> _attributes;
|
||||
mutable Array<MObject*, ArenaAllocation> _attributes;
|
||||
|
||||
public:
|
||||
#if USE_MONO
|
||||
@@ -157,5 +158,5 @@ public:
|
||||
/// Returns an instance of all attributes connected with given field. Returns null if the field doesn't have any attributes.
|
||||
/// </summary>
|
||||
/// <returns>The array of attribute objects.</returns>
|
||||
const Array<MObject*>& GetAttributes() const;
|
||||
const Array<MObject*, ArenaAllocation>& GetAttributes() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user