Optimize dynamic memory allocations for managed runtime interop collections with a new Arena Allocation

This commit is contained in:
Wojtek Figat
2025-05-25 17:39:20 +02:00
parent 9aaba955d0
commit 8c62f1120f
13 changed files with 185 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ protected:
mutable int32 _hasAddMonoMethod : 1;
mutable int32 _hasRemoveMonoMethod : 1;
mutable Array<MObject*> _attributes;
mutable Array<MObject*, ArenaAllocation> _attributes;
public:
#if USE_MONO
@@ -121,5 +121,5 @@ public:
/// Returns an instance of all attributes connected with given event. Returns null if the event doesn't have any attributes.
/// </summary>
/// <returns>The array of attribute objects.</returns>
const Array<MObject*>& GetAttributes() const;
const Array<MObject*, ArenaAllocation>& GetAttributes() const;
};