//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Core/TempAllocator.h:135
///
/// class TempAllocatorMalloc final : public TempAllocator
///
///
///
///
/// Implementation of the TempAllocator that just falls back to malloc/free
/// Note: This can be quite slow when running in the debugger as large memory blocks need to be initialized with 0xcd
///
///
[InteropHandle]
public readonly partial struct TempAllocatorMalloc : IDisposable
{
public static TempAllocatorMalloc Create() => Jolt.PInvoke.TempAllocatorMalloc_Create();
///
///
/// C++:
/// Jolt/Core/TempAllocator.h:141
///
/// virtual void * Allocate(uint inSize) override
///
///
///
///
/// See: TempAllocator
///
///
public unsafe Ptr Allocate(uint size) => Jolt.PInvoke.TempAllocatorMalloc_Allocate(this, size);
///
///
/// C++:
/// Jolt/Core/TempAllocator.h:155
///
/// virtual void Free(void *inAddress, uint inSize) override
///
///
///
///
/// See: TempAllocator
///
///
public unsafe void Free(Ptr address, uint size) => Jolt.PInvoke.TempAllocatorMalloc_Free(this, address, size);
public static implicit operator TempAllocator(TempAllocatorMalloc value) => Jolt.PInvoke.TempAllocatorMalloc_AsTempAllocator(value);
public void Dispose() => Jolt.PInvoke.TempAllocatorMalloc_Destroy(this);
}
}