From 74e3b4ae2348e66af6c944e1b700b1ce6d74ac8d Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Wed, 17 Jan 2018 01:54:02 +0100 Subject: [PATCH] Added Ref::instance() --- include/core/Ref.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/core/Ref.hpp b/include/core/Ref.hpp index 7e35641a..345b4556 100644 --- a/include/core/Ref.hpp +++ b/include/core/Ref.hpp @@ -162,6 +162,11 @@ public: reference = nullptr; } + void instance() + { + ref(new T); + } + Ref() { reference = nullptr;