From 5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 20 Aug 2026 02:27:02 +0200 Subject: [chore]: MASSIVE refactor + more vulkan bs --- 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..3240c71 --- /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 auto create_scope(Args&& ... args) -> Scope + { + return std::make_unique(std::forward(args)...); + } + + template + constexpr auto create_ref(Args&& ... args) -> Ref + { + return std::make_shared(std::forward(args)...); + } +}; -- cgit v1.3