Pārlūkot izejas kodu

Added Ref<T>::instance()

Marc Gilleron 7 gadi atpakaļ
vecāks
revīzija
74e3b4ae23
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      include/core/Ref.hpp

+ 5 - 0
include/core/Ref.hpp

@@ -162,6 +162,11 @@ public:
 		reference = nullptr;
 		reference = nullptr;
 	}
 	}
 	
 	
+	void instance()
+	{
+		ref(new T);
+	}
+
 	Ref()
 	Ref()
 	{
 	{
 		reference = nullptr;
 		reference = nullptr;