Optimize job system memory allocations
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include "Engine/Platform/Platform.h"
|
||||
#include "Engine/Core/Memory/Memory.h"
|
||||
#include "Engine/Core/Memory/Allocation.h"
|
||||
#include "Engine/Core/Math/Math.h"
|
||||
|
||||
/// <summary>
|
||||
/// Template for ring buffer with variable capacity.
|
||||
@@ -98,4 +99,10 @@ public:
|
||||
Memory::DestructItems(Get() + Math::Min(_front, _back), _count);
|
||||
_front = _back = _count = 0;
|
||||
}
|
||||
|
||||
void Release()
|
||||
{
|
||||
Clear();
|
||||
_allocation.Free();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user