Forráskód Böngészése

Added Ref<T>::instance()

Marc Gilleron 7 éve
szülő
commit
74e3b4ae23
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      include/core/Ref.hpp

+ 5 - 0
include/core/Ref.hpp

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