From 7892ef9d248c189be68ce7faf63230ec0a318b67 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Feb 2022 10:11:32 +0100 Subject: refactor: reorganize & add debugging --- src/utils/memory.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/utils/memory.hpp (limited to 'src/utils/memory.hpp') diff --git a/src/utils/memory.hpp b/src/utils/memory.hpp new file mode 100644 index 0000000..81e3757 --- /dev/null +++ b/src/utils/memory.hpp @@ -0,0 +1,23 @@ +#pragma once + +template +memType *malloc_s(unsigned int size); + +template +class unique_ptr +{ +public: + unique_ptr(Target *target); + ~unique_ptr(); + + Target operator *() const; + Target *operator ->() const; + +private: + Target *_target; +}; + +template +unique_ptr make_unique(Args&... args); + +#include "memory.tpp" -- cgit v1.2.3-18-g5258