Browse Source

Added Ref<T>::instance()

Marc Gilleron 7 years ago
parent
commit
74e3b4ae23
1 changed files with 5 additions and 0 deletions
  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;