From e050dce79b67ae6386240567a994454711ab998d Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 14 Aug 2025 00:42:05 +0200 Subject: [add]: Custom memory managers and fix includes --- src/Core/Memory.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/Core/Memory.h (limited to 'src/Core/Memory.h') diff --git a/src/Core/Memory.h b/src/Core/Memory.h new file mode 100644 index 0000000..0abc6b1 --- /dev/null +++ b/src/Core/Memory.h @@ -0,0 +1,24 @@ +#pragma once + +#include + +namespace Donut +{ + template + using Ref = std::shared_ptr; + + template + using Scope = std::unique_ptr; + + template + constexpr Scope CreateScope(Args&& ... args) + { + return std::make_unique(std::forward(args)...); + } + + template + constexpr Ref CreateRef(Args&& ... args) + { + return std::make_shared(std::forward(args)...); + } +}; \ No newline at end of file -- cgit v1.3