Browse Source

Removed all the unused allocators

Marko Pintera 10 years ago
parent
commit
2c35a0c825
100 changed files with 448 additions and 458 deletions
  1. 5 17
      BansheeCore/Include/BsCoreObject.h
  2. 4 4
      BansheeCore/Include/BsFontImportOptionsRTTI.h
  3. 11 11
      BansheeCore/Include/BsFontRTTI.h
  4. 3 3
      BansheeCore/Include/BsGameObjectHandle.h
  5. 5 5
      BansheeCore/Include/BsGameObjectHandleRTTI.h
  6. 1 1
      BansheeCore/Include/BsGpuBuffer.h
  7. 6 6
      BansheeCore/Include/BsGpuParamBlockBuffer.h
  8. 0 2
      BansheeCore/Include/BsGpuProgramManager.h
  9. 1 1
      BansheeCore/Include/BsGpuResourceData.h
  10. 4 4
      BansheeCore/Include/BsImportOptionsRTTI.h
  11. 1 1
      BansheeCore/Include/BsMaterial.h
  12. 62 62
      BansheeCore/Include/BsMaterialRTTI.h
  13. 6 6
      BansheeCore/Include/BsMesh.h
  14. 2 2
      BansheeCore/Include/BsMeshData.h
  15. 4 4
      BansheeCore/Include/BsMeshDataRTTI.h
  16. 2 2
      BansheeCore/Include/BsMeshHeap.h
  17. 4 4
      BansheeCore/Include/BsMeshImportOptionsRTTI.h
  18. 1 1
      BansheeCore/Include/BsMeshManager.h
  19. 5 5
      BansheeCore/Include/BsPass.h
  20. 4 4
      BansheeCore/Include/BsPixelDataRTTI.h
  21. 3 3
      BansheeCore/Include/BsPrefabDiffRTTI.h
  22. 3 3
      BansheeCore/Include/BsResourceHandle.h
  23. 6 6
      BansheeCore/Include/BsResourceHandleRTTI.h
  24. 1 1
      BansheeCore/Include/BsResourceMetaDataRTTI.h
  25. 1 1
      BansheeCore/Include/BsSavedResourceDataRTTI.h
  26. 5 4
      BansheeCore/Include/BsSceneObject.h
  27. 4 4
      BansheeCore/Include/BsShader.h
  28. 1 1
      BansheeCore/Include/BsShaderInclude.h
  29. 1 1
      BansheeCore/Include/BsShaderRTTI.h
  30. 1 1
      BansheeCore/Include/BsStringTableRTTI.h
  31. 3 3
      BansheeCore/Include/BsTexture.h
  32. 4 4
      BansheeCore/Include/BsTextureImportOptionsRTTI.h
  33. 7 7
      BansheeCore/Include/BsTextureRTTI.h
  34. 1 1
      BansheeCore/Include/BsVertexDataDesc.h
  35. 4 4
      BansheeCore/Include/BsVertexDataDescRTTI.h
  36. 10 10
      BansheeCore/Include/BsViewport.h
  37. 3 3
      BansheeCore/Source/BsCommandQueue.cpp
  38. 1 1
      BansheeCore/Source/BsCoreApplication.cpp
  39. 2 2
      BansheeCore/Source/BsCoreRenderer.cpp
  40. 1 1
      BansheeCore/Source/BsCoreThread.cpp
  41. 2 2
      BansheeCore/Source/BsFontManager.cpp
  42. 1 1
      BansheeCore/Source/BsGameObject.cpp
  43. 3 3
      BansheeCore/Source/BsGameObjectHandle.cpp
  44. 3 3
      BansheeCore/Source/BsGpuBuffer.cpp
  45. 2 2
      BansheeCore/Source/BsGpuParamBlockBuffer.cpp
  46. 3 3
      BansheeCore/Source/BsGpuParams.cpp
  47. 1 1
      BansheeCore/Source/BsGpuProgram.cpp
  48. 7 7
      BansheeCore/Source/BsGpuProgramManager.cpp
  49. 2 2
      BansheeCore/Source/BsGpuResourceData.cpp
  50. 8 8
      BansheeCore/Source/BsHardwareBufferManager.cpp
  51. 1 1
      BansheeCore/Source/BsInput.cpp
  52. 8 8
      BansheeCore/Source/BsMaterial.cpp
  53. 3 3
      BansheeCore/Source/BsMaterialManager.cpp
  54. 1 1
      BansheeCore/Source/BsMaterialRTTI.cpp
  55. 3 3
      BansheeCore/Source/BsMesh.cpp
  56. 2 2
      BansheeCore/Source/BsMeshData.cpp
  57. 4 4
      BansheeCore/Source/BsMeshHeap.cpp
  58. 7 7
      BansheeCore/Source/BsMeshManager.cpp
  59. 4 4
      BansheeCore/Source/BsPass.cpp
  60. 2 2
      BansheeCore/Source/BsPixelData.cpp
  61. 3 3
      BansheeCore/Source/BsPixelUtil.cpp
  62. 1 1
      BansheeCore/Source/BsPrefab.cpp
  63. 9 9
      BansheeCore/Source/BsPrefabDiff.cpp
  64. 1 1
      BansheeCore/Source/BsProfilerCPU.cpp
  65. 2 2
      BansheeCore/Source/BsProfilingManager.cpp
  66. 12 12
      BansheeCore/Source/BsRenderStateManager.cpp
  67. 1 1
      BansheeCore/Source/BsRendererMeshData.cpp
  68. 1 1
      BansheeCore/Source/BsResource.cpp
  69. 2 2
      BansheeCore/Source/BsResourceManifest.cpp
  70. 1 1
      BansheeCore/Source/BsResources.cpp
  71. 2 2
      BansheeCore/Source/BsSceneObject.cpp
  72. 5 5
      BansheeCore/Source/BsShader.cpp
  73. 2 2
      BansheeCore/Source/BsShaderInclude.cpp
  74. 1 1
      BansheeCore/Source/BsSpecificImporter.cpp
  75. 3 3
      BansheeCore/Source/BsStringTable.cpp
  76. 4 4
      BansheeCore/Source/BsTechnique.cpp
  77. 5 5
      BansheeCore/Source/BsTexture.cpp
  78. 2 2
      BansheeCore/Source/BsTextureManager.cpp
  79. 1 1
      BansheeCore/Source/BsTransientMesh.cpp
  80. 3 3
      BansheeCore/Source/BsVertexDataDesc.cpp
  81. 4 4
      BansheeCore/Source/BsViewport.cpp
  82. 8 8
      BansheeD3D11RenderSystem/Include/BsD3D11GpuBuffer.h
  83. 3 3
      BansheeD3D11RenderSystem/Include/BsD3D11GpuParamBlockBuffer.h
  84. 3 3
      BansheeD3D11RenderSystem/Include/BsD3D11HLSLProgramFactory.h
  85. 5 5
      BansheeD3D11RenderSystem/Include/BsD3D11HardwareBuffer.h
  86. 7 4
      BansheeD3D11RenderSystem/Include/BsD3D11HardwareBufferManager.h
  87. 6 6
      BansheeD3D11RenderSystem/Include/BsD3D11IndexBuffer.h
  88. 35 35
      BansheeD3D11RenderSystem/Include/BsD3D11RenderAPI.h
  89. 1 1
      BansheeD3D11RenderSystem/Include/BsD3D11RenderAPIFactory.h
  90. 4 4
      BansheeD3D11RenderSystem/Include/BsD3D11RenderStateManager.h
  91. 2 2
      BansheeD3D11RenderSystem/Include/BsD3D11RenderWindowManager.h
  92. 6 6
      BansheeD3D11RenderSystem/Include/BsD3D11Texture.h
  93. 6 6
      BansheeD3D11RenderSystem/Include/BsD3D11TextureManager.h
  94. 6 6
      BansheeD3D11RenderSystem/Include/BsD3D11VertexBuffer.h
  95. 5 5
      BansheeD3D11RenderSystem/Source/BsD3D11Driver.cpp
  96. 4 4
      BansheeD3D11RenderSystem/Source/BsD3D11GpuBuffer.cpp
  97. 3 3
      BansheeD3D11RenderSystem/Source/BsD3D11GpuParamBlockBuffer.cpp
  98. 10 10
      BansheeD3D11RenderSystem/Source/BsD3D11HLSLProgramFactory.cpp
  99. 3 3
      BansheeD3D11RenderSystem/Source/BsD3D11HardwareBuffer.cpp
  100. 6 6
      BansheeD3D11RenderSystem/Source/BsD3D11HardwareBufferManager.cpp

+ 5 - 17
BansheeCore/Include/BsCoreObject.h

@@ -93,7 +93,7 @@ namespace BansheeEngine
 			if (!obj->isDestroyed())
 				obj->destroy();
 
-			bs_delete<MemAlloc, T>((T*)obj);
+			bs_delete<T, MemAlloc>((T*)obj);
 		}
 
 		/**
@@ -237,7 +237,7 @@ namespace BansheeEngine
 	 * 			and you should not create them manually.
 	 */
 	template<class Type, class MainAlloc, class PtrDataAlloc, class... Args>
-	std::shared_ptr<Type> bs_core_ptr(Args &&...args)
+	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
 	{
 		return std::shared_ptr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, PtrDataAlloc>());
@@ -250,7 +250,7 @@ namespace BansheeEngine
 	 * 			and you should not create them manually.
 	 */
 	template<class Type, class MainAlloc, class... Args>
-	std::shared_ptr<Type> bs_core_ptr(Args &&...args)
+	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
 	{
 		return std::shared_ptr<Type>(bs_new<Type, MainAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, GenAlloc>());
@@ -263,7 +263,7 @@ namespace BansheeEngine
 	 * 			and you should not create them manually.
 	 */
 	template<class Type, class... Args>
-	std::shared_ptr<Type> bs_core_ptr(Args &&...args)
+	std::shared_ptr<Type> bs_core_ptr_new(Args &&...args)
 	{
 		return std::shared_ptr<Type>(bs_new<Type, GenAlloc>(std::forward<Args>(args)...),
 			&CoreObject::_delete<Type, GenAlloc>, StdAlloc<Type, GenAlloc>());
@@ -275,19 +275,7 @@ namespace BansheeEngine
 	 * @note	All core thread object shared pointers must be created using this method or its overloads
 	 * 			and you should not create them manually.
 	 */
-	template<class Type, class MainAlloc>
-	std::shared_ptr<Type> bs_core_ptr(Type* data)
-	{
-		return std::shared_ptr<Type>(data, &CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, GenAlloc>());  
-	}
-
-	/**
-	 * @brief	Creates a core object shared pointer using a previously constructed object.
-	 *
-	 * @note	All core thread object shared pointers must be created using this method or its overloads
-	 * 			and you should not create them manually.
-	 */
-	template<class Type, class MainAlloc, class PtrDataAlloc>
+	template<class Type, class MainAlloc = GenAlloc, class PtrDataAlloc = GenAlloc>
 	std::shared_ptr<Type> bs_core_ptr(Type* data)
 	{
 		return std::shared_ptr<Type>(data, &CoreObject::_delete<Type, MainAlloc>, StdAlloc<Type, PtrDataAlloc>());  

+ 4 - 4
BansheeCore/Include/BsFontImportOptionsRTTI.h

@@ -30,20 +30,20 @@ namespace BansheeEngine
 			addPlainField("mAntialiasing", 3, &FontImportOptionsRTTI::getAntialiasing, &FontImportOptionsRTTI::setAntialiasing);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "FontImportOptions";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_FontImportOptions;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<FontImportOptions, PoolAlloc>();
+			return bs_shared_ptr_new<FontImportOptions>();
 		}
 	};
 }

+ 11 - 11
BansheeCore/Include/BsFontRTTI.h

@@ -59,20 +59,20 @@ namespace BansheeEngine
 			addReflectableArrayField("texturePages", 2, &FontDataRTTI::getTexture, &FontDataRTTI::getTextureArraySize, &FontDataRTTI::setTexture, &FontDataRTTI::setTextureArraySize);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "FontData";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_FontData;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<FontData, PoolAlloc>();
+			return bs_shared_ptr_new<FontData>();
 		}
 	};
 
@@ -121,39 +121,39 @@ namespace BansheeEngine
 			addReflectableArrayField("mFontDataPerSize", 0, &FontRTTI::getFontData, &FontRTTI::getNumFontData, &FontRTTI::setFontData, &FontRTTI::setNumFontData);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "Font";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_Font;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
 			return FontManager::instance()._createEmpty();
 		}
 
 	protected:
-		virtual void onDeserializationStarted(IReflectable* obj)
+		virtual void onDeserializationStarted(IReflectable* obj) override
 		{
-			FontInitData* initData = bs_new<FontInitData, PoolAlloc>();
+			FontInitData* initData = bs_new<FontInitData>();
 
 			Font* font = static_cast<Font*>(obj);
 			font->mRTTIData = initData;
 		}
 
-		virtual void onDeserializationEnded(IReflectable* obj)
+		virtual void onDeserializationEnded(IReflectable* obj) override
 		{
 			Font* font = static_cast<Font*>(obj);
 			FontInitData* initData = any_cast<FontInitData*>(font->mRTTIData);
 
 			font->initialize(initData->fontDataPerSize);
 
-			bs_delete<PoolAlloc>(initData);
+			bs_delete(initData);
 		}
 	};
 }

+ 3 - 3
BansheeCore/Include/BsGameObjectHandle.h

@@ -157,7 +157,7 @@ namespace BansheeEngine
 	public:
 		friend class GameObjectHandleRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	/**
@@ -176,7 +176,7 @@ namespace BansheeEngine
 		GameObjectHandle()
 			:GameObjectHandleBase()
 		{	
-			mData = bs_shared_ptr<GameObjectHandleData, PoolAlloc>();
+			mData = bs_shared_ptr_new<GameObjectHandleData>();
 		}
 
 		/**
@@ -203,7 +203,7 @@ namespace BansheeEngine
 		 */
 		inline GameObjectHandle<T>& operator=(std::nullptr_t ptr)
 		{ 	
-			mData = bs_shared_ptr<GameObjectHandleData, PoolAlloc>();
+			mData = bs_shared_ptr_new<GameObjectHandleData>();
 
 			return *this;
 		}

+ 5 - 5
BansheeCore/Include/BsGameObjectHandleRTTI.h

@@ -19,27 +19,27 @@ namespace BansheeEngine
 			addPlainField("mInstanceID", 0, &GameObjectHandleRTTI::getInstanceId, &GameObjectHandleRTTI::setInstanceId);
 		}
 
-		void onDeserializationEnded(IReflectable* obj)
+		void onDeserializationEnded(IReflectable* obj) override
 		{
 			GameObjectHandleBase* gameObjectHandle = static_cast<GameObjectHandleBase*>(obj);
 
 			GameObjectManager::instance().registerUnresolvedHandle(*gameObjectHandle);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "GameObjectHandleBase";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_GameObjectHandleBase;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			std::shared_ptr<GameObjectHandleBase> obj = bs_shared_ptr<GameObjectHandleBase, PoolAlloc>(new (bs_alloc<GameObjectHandleBase, PoolAlloc>()) GameObjectHandleBase());
+			std::shared_ptr<GameObjectHandleBase> obj = bs_shared_ptr<GameObjectHandleBase>(new (bs_alloc<GameObjectHandleBase>()) GameObjectHandleBase());
 
 			return obj;
 		}

+ 1 - 1
BansheeCore/Include/BsGpuBuffer.h

@@ -226,7 +226,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @copydoc	HardwareBufferManager::createGpuParamBlockBuffer

+ 6 - 6
BansheeCore/Include/BsGpuParamBlockBuffer.h

@@ -78,7 +78,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObjectCore::syncToCore
 		 */
-		virtual void syncToCore(const CoreSyncData& data);
+		virtual void syncToCore(const CoreSyncData& data)  override;
 
 		GpuParamBlockUsage mUsage;
 		UINT32 mSize;
@@ -152,12 +152,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @copydoc	CoreObject::syncToCore
 		 */
-		virtual CoreSyncData syncToCore(FrameAlloc* allocator);
+		virtual CoreSyncData syncToCore(FrameAlloc* allocator) override;
 
 		GpuParamBlockUsage mUsage;
 		UINT32 mSize;
@@ -177,12 +177,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	GpuParamBlockBufferCore::writeData
 		 */
-		void writeToGPU(const UINT8* data);
+		void writeToGPU(const UINT8* data) override;
 
 		/**
 		 * @copydoc GpuParamBlockBufferCore::readData.
 		 */
-		void readFromGPU(UINT8* data) const;
+		void readFromGPU(UINT8* data) const override;
 
 	protected:
 		UINT8* mData;
@@ -190,6 +190,6 @@ namespace BansheeEngine
 		/**
 		 * @copydoc CoreObjectCore::initialize
 		 */
-		virtual void initialize();
+		virtual void initialize() override;
 	};
 }

+ 0 - 2
BansheeCore/Include/BsGpuProgramManager.h

@@ -83,8 +83,6 @@ namespace BansheeEngine
 	 */
 	class BS_CORE_EXPORT GpuProgramCoreManager : public Module<GpuProgramCoreManager>
 	{
-	public:
-		
 	public:
 		GpuProgramCoreManager();
 		virtual ~GpuProgramCoreManager();

+ 1 - 1
BansheeCore/Include/BsGpuResourceData.h

@@ -101,6 +101,6 @@ namespace BansheeEngine
 	public:
 		friend class GpuResourceDataRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 4 - 4
BansheeCore/Include/BsImportOptionsRTTI.h

@@ -13,20 +13,20 @@ namespace BansheeEngine
 		{
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "ImportOptions";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_ImportOptions;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<ImportOptions, PoolAlloc>();
+			return bs_shared_ptr_new<ImportOptions>();
 		}
 	};
 }

+ 1 - 1
BansheeCore/Include/BsMaterial.h

@@ -89,7 +89,7 @@ namespace BansheeEngine
 			StructData(UINT32 _size)
 				:size(_size)
 			{
-				data = std::shared_ptr<void>(bs_alloc<ScratchAlloc>(_size), &bs_free<ScratchAlloc>);
+				data = std::shared_ptr<void>(bs_alloc(_size), &bs_free);
 			}
 
 			/**

+ 62 - 62
BansheeCore/Include/BsMaterialRTTI.h

@@ -29,7 +29,7 @@ namespace BansheeEngine
 
 		friend class MaterialFloatParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialVec2Param : public IReflectable
@@ -41,7 +41,7 @@ namespace BansheeEngine
 
 		friend class MaterialVec2ParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialVec3Param : public IReflectable
@@ -53,7 +53,7 @@ namespace BansheeEngine
 
 		friend class MaterialVec3ParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialVec4Param : public IReflectable
@@ -65,7 +65,7 @@ namespace BansheeEngine
 
 		friend class MaterialVec4ParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialColorParam : public IReflectable
@@ -77,7 +77,7 @@ namespace BansheeEngine
 
 		friend class MaterialColorParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 
@@ -90,7 +90,7 @@ namespace BansheeEngine
 
 		friend class MaterialMat3ParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialMat4Param : public IReflectable
@@ -102,7 +102,7 @@ namespace BansheeEngine
 
 		friend class MaterialMat4ParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialStructParam : public IReflectable
@@ -115,7 +115,7 @@ namespace BansheeEngine
 
 		friend class MaterialStructParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialTextureParam : public IReflectable
@@ -126,7 +126,7 @@ namespace BansheeEngine
 
 		friend class MaterialTextureParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialSamplerStateParam : public IReflectable
@@ -137,7 +137,7 @@ namespace BansheeEngine
 
 		friend class MaterialSamplerStateParamRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	class BS_CORE_EXPORT MaterialParams : public IReflectable
@@ -156,7 +156,7 @@ namespace BansheeEngine
 
 		friend class MaterialParamsRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	/************************************************************************/
@@ -182,16 +182,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialFloatParamRTTI::getArrayIdx, &MaterialFloatParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialFloatParam";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamFloat; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamFloat; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialFloatParam, ScratchAlloc>(); 
+			return bs_shared_ptr_new<MaterialFloatParam>(); 
 		}
 	};
 
@@ -214,16 +214,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialVec2ParamRTTI::getArrayIdx, &MaterialVec2ParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialVec2Param";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamVec2; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamVec2; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialVec2Param, ScratchAlloc>(); 
+			return bs_shared_ptr_new<MaterialVec2Param>(); 
 		}
 	};
 
@@ -246,16 +246,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialVec3ParamRTTI::getArrayIdx, &MaterialVec3ParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialVec3Param";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamVec3; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamVec3; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialVec3Param, ScratchAlloc>(); 
+			return bs_shared_ptr_new<MaterialVec3Param>(); 
 		}
 	};
 
@@ -278,16 +278,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialVec4ParamRTTI::getArrayIdx, &MaterialVec4ParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialVec4Param";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamVec4; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamVec4; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<MaterialVec4Param, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialVec4Param>();
 		}
 	};
 
@@ -310,16 +310,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialColorParamRTTI::getArrayIdx, &MaterialColorParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialColorParam";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamColor; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamColor; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<MaterialColorParam, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialColorParam>();
 		}
 	};
 
@@ -342,16 +342,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialMat3ParamRTTI::getArrayIdx, &MaterialMat3ParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialMat3Param";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamMat3; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamMat3; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialMat3Param, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialMat3Param>();
 		}
 	};
 
@@ -374,16 +374,16 @@ namespace BansheeEngine
 			addPlainField("arrayIdx", 2, &MaterialMat4ParamRTTI::getArrayIdx, &MaterialMat4ParamRTTI::setArrayIdx);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialMat4Param";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamMat4; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamMat4; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialMat4Param, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialMat4Param>();
 		}
 	};
 
@@ -424,16 +424,16 @@ namespace BansheeEngine
 			addPlainField("elementSize", 3, &MaterialStructParamRTTI::getElementSize, &MaterialStructParamRTTI::setElementSize);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialStructParam";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamStruct; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamStruct; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialStructParam, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialStructParam>();
 		}
 	};
 
@@ -452,16 +452,16 @@ namespace BansheeEngine
 			addReflectableField("value", 1, &MaterialTextureParamRTTI::getValue, &MaterialTextureParamRTTI::setValue);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialTextureParam";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamTexture; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamTexture; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialTextureParam, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialTextureParam>();
 		}
 	};
 
@@ -480,16 +480,16 @@ namespace BansheeEngine
 			addReflectablePtrField("value", 1, &MaterialSamplerStateParamRTTI::getValue, &MaterialSamplerStateParamRTTI::setValue);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MaterialSamplerStateParam";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParamSamplerState; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParamSamplerState; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialSamplerStateParam, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialSamplerStateParam>();
 		}
 	};
 
@@ -579,16 +579,16 @@ namespace BansheeEngine
 				&MaterialParamsRTTI::getColorArraySize, &MaterialParamsRTTI::setColorParam, &MaterialParamsRTTI::setColorArraySize);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName()  override
 		{
 			static String name = "MaterialParams";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId() { return TID_MaterialParams; }
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual UINT32 getRTTIId() override { return TID_MaterialParams; }
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{ 
-			return bs_shared_ptr<MaterialParams, ScratchAlloc>();
+			return bs_shared_ptr_new<MaterialParams>();
 		}
 	};
 
@@ -625,22 +625,22 @@ namespace BansheeEngine
 			addReflectablePtrField("mMaterialParams", 1, &MaterialRTTI::getMaterialParams, &MaterialRTTI::setMaterialParams);
 		}
 
-		virtual void onSerializationStarted(IReflectable* obj);
-		virtual void onSerializationEnded(IReflectable* obj);
-		virtual void onDeserializationStarted(IReflectable* obj);
-		virtual void onDeserializationEnded(IReflectable* obj);
+		virtual void onSerializationStarted(IReflectable* obj) override;
+		virtual void onSerializationEnded(IReflectable* obj) override;
+		virtual void onDeserializationStarted(IReflectable* obj) override;
+		virtual void onDeserializationEnded(IReflectable* obj) override;
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "Material";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_Material;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject();
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override;
 	};
 }

+ 6 - 6
BansheeCore/Include/BsMesh.h

@@ -29,17 +29,17 @@ namespace BansheeEngine
 		/**
 		 * @brief	CoreObjectCore::initialize
 		 */
-		virtual void initialize();
+		virtual void initialize() override;
 
 		/**
 		 * @copydoc MeshCoreBase::getVertexData
 		 */
-		virtual SPtr<VertexData> getVertexData() const;
+		virtual SPtr<VertexData> getVertexData() const override;
 
 		/**
 		 * @copydoc MeshCoreBase::getIndexBuffer
 		 */
-		virtual SPtr<IndexBufferCore> getIndexBuffer() const;
+		virtual SPtr<IndexBufferCore> getIndexBuffer() const override;
 
 		/**
 		 * @brief	Updates a part of the current mesh with the provided data.
@@ -95,7 +95,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	MeshBase::initialize
 		 */
-		virtual void initialize();
+		virtual void initialize() override;
 
 		/**
 		 * @brief	Updates the mesh with new data. The actual write will be queued for later execution on the core thread.
@@ -181,7 +181,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @brief	Creates buffers used for caching of CPU mesh data.
@@ -210,7 +210,7 @@ namespace BansheeEngine
 	public:
 		friend class MeshRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 
 		/************************************************************************/
 		/* 								STATICS		                     		*/

+ 2 - 2
BansheeCore/Include/BsMeshData.h

@@ -258,7 +258,7 @@ namespace BansheeEngine
 		/**
 		 * @brief	Returns the size of the internal buffer in bytes.
 		 */
-		UINT32 getInternalBufferSize() const;
+		UINT32 getInternalBufferSize() const override;
 
 	private:
 		/**
@@ -332,6 +332,6 @@ namespace BansheeEngine
 	public:
 		friend class MeshDataRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 4 - 4
BansheeCore/Include/BsMeshDataRTTI.h

@@ -56,18 +56,18 @@ namespace BansheeEngine
 			addDataBlockField("data", 4, &MeshDataRTTI::getData, &MeshDataRTTI::setData, 0, &MeshDataRTTI::allocateData);
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<MeshData, PoolAlloc>(new (bs_alloc<MeshData, PoolAlloc>()) MeshData());
+			return bs_shared_ptr<MeshData>(new (bs_alloc<MeshData>()) MeshData());
 		}
 
-		virtual const String& getRTTIName() 
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MeshData";
 			throw name;
 		}
 
-		virtual UINT32 getRTTIId() 
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_MeshData;
 		}

+ 2 - 2
BansheeCore/Include/BsMeshHeap.h

@@ -71,7 +71,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc CoreObjectCore::initialize()
 		 */
-		virtual void initialize();
+		virtual void initialize() override;
 
 		/**
 		 * @brief	Allocates a new mesh in the heap, expanding the heap if needed. 
@@ -246,7 +246,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 	private:
 		UINT32 mNumVertices;

+ 4 - 4
BansheeCore/Include/BsMeshImportOptionsRTTI.h

@@ -42,20 +42,20 @@ namespace BansheeEngine
 			addPlainField("mImportScale", 6, &MeshImportOptionsRTTI::getImportScale, &MeshImportOptionsRTTI::setImportScale);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "MeshImportOptions";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_MeshImportOptions;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<MeshImportOptions, PoolAlloc>();
+			return bs_shared_ptr_new<MeshImportOptions>();
 		}
 	};
 }

+ 1 - 1
BansheeCore/Include/BsMeshManager.h

@@ -58,7 +58,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc		Module::onStartUp
 		 */
-		virtual void onStartUp();
+		virtual void onStartUp() override;
 
 	private:
 		MeshDataPtr mDummyMeshData;

+ 5 - 5
BansheeCore/Include/BsPass.h

@@ -154,7 +154,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObjectCore::syncToCore
 		 */
-		void syncToCore(const CoreSyncData& data);
+		void syncToCore(const CoreSyncData& data) override;
     };
 
 	/**
@@ -187,17 +187,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::syncToCore
 		 */
-		CoreSyncData syncToCore(FrameAlloc* allocator);
+		CoreSyncData syncToCore(FrameAlloc* allocator) override;
 
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @copydoc	CoreObject::syncToCore
 		 */
-		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies);
+		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies) override;
 
 		/**
 		 * @brief	Creates a new empty pass but doesn't initialize it.
@@ -210,6 +210,6 @@ namespace BansheeEngine
 	public:
 		friend class PassRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
     };
 }

+ 4 - 4
BansheeCore/Include/BsPixelDataRTTI.h

@@ -71,20 +71,20 @@ namespace BansheeEngine
 			addDataBlockField("data", 9, &PixelDataRTTI::getData, &PixelDataRTTI::setData, 0, &PixelDataRTTI::allocateData);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "PixelData";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_PixelData;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			PixelDataPtr newPixelData = bs_shared_ptr<PixelData, PoolAlloc>();
+			PixelDataPtr newPixelData = bs_shared_ptr_new<PixelData>();
 
 			return newPixelData;
 		}

+ 3 - 3
BansheeCore/Include/BsPrefabDiffRTTI.h

@@ -34,7 +34,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<PrefabComponentDiff>();
+			return bs_shared_ptr_new<PrefabComponentDiff>();
 		}
 	};
 
@@ -79,7 +79,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<PrefabObjectDiff>();
+			return bs_shared_ptr_new<PrefabObjectDiff>();
 		}
 	};
 
@@ -219,7 +219,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<PrefabDiff>();
+			return bs_shared_ptr_new<PrefabDiff>();
 		}
 	};
 }

+ 3 - 3
BansheeCore/Include/BsResourceHandle.h

@@ -122,7 +122,7 @@ namespace BansheeEngine
 		ResourceHandle(const String& uuid)
 			:ResourceHandleBase()
 		{
-			mData = bs_shared_ptr<ResourceHandleData, PoolAlloc>();
+			mData = bs_shared_ptr_new<ResourceHandleData>();
 			mData->mUUID = uuid;
 		}
 
@@ -223,7 +223,7 @@ namespace BansheeEngine
 		explicit ResourceHandle(T* ptr, const String& uuid)
 			:ResourceHandleBase()
 		{
-			mData = bs_shared_ptr<ResourceHandleData, PoolAlloc>();
+			mData = bs_shared_ptr_new<ResourceHandleData>();
 			_setHandleData(std::shared_ptr<Resource>(ptr, uuid));
 		}
 
@@ -233,7 +233,7 @@ namespace BansheeEngine
 		ResourceHandle(std::shared_ptr<T> ptr, const String& uuid)
 			:ResourceHandleBase()
 		{
-			mData = bs_shared_ptr<ResourceHandleData, PoolAlloc>();
+			mData = bs_shared_ptr_new<ResourceHandleData>();
 			_setHandleData(ptr, uuid);
 		}
 	};

+ 6 - 6
BansheeCore/Include/BsResourceHandleRTTI.h

@@ -24,7 +24,7 @@ namespace BansheeEngine
 			addPlainField("mUUID", 0, &ResourceHandleRTTI::getUUID, &ResourceHandleRTTI::setUUID);
 		}
 
-		void onDeserializationEnded(IReflectable* obj)
+		void onDeserializationEnded(IReflectable* obj) override
 		{
 			ResourceHandleBase* resourceHandle = static_cast<ResourceHandleBase*>(obj);
 
@@ -40,21 +40,21 @@ namespace BansheeEngine
 			}
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "ResourceHandleBase";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_ResourceHandle;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			std::shared_ptr<ResourceHandleBase> obj = bs_shared_ptr<ResourceHandleBase, PoolAlloc>(new (bs_alloc<ResourceHandleBase, PoolAlloc>()) ResourceHandleBase());
-			obj->mData = bs_shared_ptr<ResourceHandleData>();
+			std::shared_ptr<ResourceHandleBase> obj = bs_shared_ptr<ResourceHandleBase>(new (bs_alloc<ResourceHandleBase>()) ResourceHandleBase());
+			obj->mData = bs_shared_ptr_new<ResourceHandleData>();
 
 			return obj;
 		}

+ 1 - 1
BansheeCore/Include/BsResourceMetaDataRTTI.h

@@ -31,7 +31,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject()
 		{
-			return bs_shared_ptr<ResourceMetaData>();
+			return bs_shared_ptr_new<ResourceMetaData>();
 		}
 	};
 }

+ 1 - 1
BansheeCore/Include/BsSavedResourceDataRTTI.h

@@ -60,7 +60,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject()
 		{
-			return bs_shared_ptr<SavedResourceData>();
+			return bs_shared_ptr_new<SavedResourceData>();
 		}
 	};
 }

+ 5 - 4
BansheeCore/Include/BsSceneObject.h

@@ -474,9 +474,9 @@ namespace BansheeEngine
 			static_assert((std::is_base_of<BansheeEngine::Component, T>::value),
 				"Specified type is not a valid Component.");
 
-			std::shared_ptr<T> gameObject(new (bs_alloc<T, PoolAlloc>()) T(mThisHandle,
+			std::shared_ptr<T> gameObject(new (bs_alloc<T>()) T(mThisHandle,
 				std::forward<Args>(args)...),
-				&bs_delete<PoolAlloc, T>, StdAlloc<T, PoolAlloc>());
+				&bs_delete<T>, StdAlloc<T>());
 
 			GameObjectHandle<T> newComponent =
 				GameObjectHandle<T>(GameObjectManager::instance().registerObject(gameObject));
@@ -585,7 +585,8 @@ namespace BansheeEngine
 		{
 			static_assert((std::is_base_of<BansheeEngine::Component, T>::value), "Specified type is not a valid Component.");
 
-			std::shared_ptr<T> gameObject(new (bs_alloc<T, PoolAlloc>()) T(), &bs_delete<PoolAlloc, T>, StdAlloc<T, PoolAlloc>());
+			T* rawPtr = new (bs_alloc<T>()) T();
+			std::shared_ptr<T> gameObject(rawPtr, &bs_delete<T>, StdAlloc<T>());
 			GameObjectHandle<T>(GameObjectManager::instance().registerObject(gameObject));
 
 			return gameObject;
@@ -605,6 +606,6 @@ namespace BansheeEngine
 		friend class GameObjectRTTI;
 		friend class SceneObjectRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 4 - 4
BansheeCore/Include/BsShader.h

@@ -447,12 +447,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::getCoreDependencies
 		 */
-		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies);
+		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies) override;
 
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @brief	Converts a sim thread version of the shader descriptor to
@@ -469,7 +469,7 @@ namespace BansheeEngine
 	public:
 		friend class ShaderRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 
 	/**
@@ -487,6 +487,6 @@ namespace BansheeEngine
 	public:
 		friend class ShaderMetaDataRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 1 - 1
BansheeCore/Include/BsShaderInclude.h

@@ -38,6 +38,6 @@ namespace BansheeEngine
 	public:
 		friend class ShaderIncludeRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 1 - 1
BansheeCore/Include/BsShaderRTTI.h

@@ -325,7 +325,7 @@ namespace BansheeEngine
 
 		virtual std::shared_ptr<IReflectable> newRTTIObject()
 		{
-			return bs_shared_ptr<ShaderMetaData>();
+			return bs_shared_ptr_new<ShaderMetaData>();
 		}
 	};
 }

+ 1 - 1
BansheeCore/Include/BsStringTableRTTI.h

@@ -100,7 +100,7 @@ namespace BansheeEngine
 				WString identifier;
 				memory = rttiReadElem(identifier, memory);
 
-				SPtr<LocalizedStringData> entryData = bs_shared_ptr<LocalizedStringData>();
+				SPtr<LocalizedStringData> entryData = bs_shared_ptr_new<LocalizedStringData>();
 				memory = rttiReadElem(*entryData, memory);
 
 				data.strings[identifier] = entryData;

+ 3 - 3
BansheeCore/Include/BsTexture.h

@@ -458,12 +458,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	Resource::initialize
 		 */
-		void initialize();
+		void initialize() override;
 
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
 		/**
 		 * @copydoc	Resource::calculateSize
@@ -494,6 +494,6 @@ namespace BansheeEngine
 
 		friend class TextureRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
     };
 }

+ 4 - 4
BansheeCore/Include/BsTextureImportOptionsRTTI.h

@@ -34,20 +34,20 @@ namespace BansheeEngine
 			addPlainField("mSRGB", 4, &TextureImportOptionsRTTI::getSRGB, &TextureImportOptionsRTTI::setSRGB);
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "TextureImportOptions";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_TextureImportOptions;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<TextureImportOptions, PoolAlloc>();
+			return bs_shared_ptr_new<TextureImportOptions>();
 		}
 	};
 }

+ 7 - 7
BansheeCore/Include/BsTextureRTTI.h

@@ -108,14 +108,14 @@ namespace BansheeEngine
 				&TextureRTTI::setPixelData, &TextureRTTI::setPixelDataArraySize, RTTI_Flag_SkipInReferenceSearch);
 		}
 
-		virtual void onDeserializationStarted(IReflectable* obj)
+		virtual void onDeserializationStarted(IReflectable* obj) override
 		{
 			Texture* texture = static_cast<Texture*>(obj);
 
-			texture->mRTTIData = bs_new<Vector<PixelDataPtr>, PoolAlloc>();
+			texture->mRTTIData = bs_new<Vector<PixelDataPtr>>();
 		}
 
-		virtual void onDeserializationEnded(IReflectable* obj)
+		virtual void onDeserializationEnded(IReflectable* obj) override
 		{
 			Texture* texture = static_cast<Texture*>(obj);
 
@@ -160,22 +160,22 @@ namespace BansheeEngine
 				texture->writeSubresource(gCoreAccessor(), subresourceIdx, pixelData->at(i), false);
 			}
 
-			bs_delete<PoolAlloc>(pixelData);
+			bs_delete(pixelData);
 			texture->mRTTIData = nullptr;	
 		}
 
-		virtual const String& getRTTIName()
+		virtual const String& getRTTIName() override
 		{
 			static String name = "Texture";
 			return name;
 		}
 
-		virtual UINT32 getRTTIId()
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_Texture;
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
 			return TextureManager::instance()._createEmpty();
 		}

+ 1 - 1
BansheeCore/Include/BsVertexDataDesc.h

@@ -106,6 +106,6 @@ namespace BansheeEngine
 	public:
 		friend class VertexDataDescRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
 	};
 }

+ 4 - 4
BansheeCore/Include/BsVertexDataDescRTTI.h

@@ -36,18 +36,18 @@ namespace BansheeEngine
 				&VertexDataDescRTTI::getNumVertexElementData, &VertexDataDescRTTI::setVertexElementData, &VertexDataDescRTTI::setNumVertexElementData);
 		}
 
-		virtual std::shared_ptr<IReflectable> newRTTIObject() 
+		virtual std::shared_ptr<IReflectable> newRTTIObject() override
 		{
-			return bs_shared_ptr<VertexDataDesc, PoolAlloc>(new (bs_alloc<VertexDataDesc, PoolAlloc>()) VertexDataDesc());
+			return bs_shared_ptr<VertexDataDesc>(new (bs_alloc<VertexDataDesc>()) VertexDataDesc());
 		}
 
-		virtual const String& getRTTIName() 
+		virtual const String& getRTTIName() override
 		{
 			static String name = "VertexDataDesc";
 			throw name;
 		}
 
-		virtual UINT32 getRTTIId() 
+		virtual UINT32 getRTTIId() override
 		{
 			return TID_VertexDataDesc;
 		}

+ 10 - 10
BansheeCore/Include/BsViewport.h

@@ -188,17 +188,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::getTargetWidth
 		 */
-		UINT32 getTargetWidth() const;
+		UINT32 getTargetWidth() const override;
 
 		/**
 		 * @copydoc	CoreObject::getTargetHeight
 		 */
-		UINT32 getTargetHeight() const;
+		UINT32 getTargetHeight() const override;
 
 		/**
 		 * @copydoc	CoreObject::syncToCore
 		 */
-		void syncToCore(const CoreSyncData& data);
+		void syncToCore(const CoreSyncData& data) override;
 
 		SPtr<RenderTargetCore> mTarget;
     };
@@ -240,32 +240,32 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	CoreObject::markCoreDirty
 		 */
-		void _markCoreDirty();
+		void _markCoreDirty() override;
 
 		/**
 		 * @copydoc	CoreObject::getTargetWidth
 		 */
-		UINT32 getTargetWidth() const;
+		UINT32 getTargetWidth() const override;
 
 		/**
 		 * @copydoc	CoreObject::getTargetHeight
 		 */
-		UINT32 getTargetHeight() const;
+		UINT32 getTargetHeight() const override;
 
 		/**
 		 * @copydoc	CoreObject::syncToCore
 		 */
-		CoreSyncData syncToCore(FrameAlloc* allocator);
+		CoreSyncData syncToCore(FrameAlloc* allocator) override;
 
 		/**
 		 * @copydoc	CoreObject::getCoreDependencies
 		 */
-		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies);
+		void getCoreDependencies(Vector<SPtr<CoreObject>>& dependencies) override;
 
 		/**
 		 * @copydoc	CoreObject::createCore
 		 */
-		SPtr<CoreObjectCore> createCore() const;
+		SPtr<CoreObjectCore> createCore() const override;
 
         RenderTargetPtr mTarget;
 
@@ -281,6 +281,6 @@ namespace BansheeEngine
 	public:
 		friend class ViewportRTTI;
 		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
+		virtual RTTITypeBase* getRTTI() const override;
     };
 }

+ 3 - 3
BansheeCore/Source/BsCommandQueue.cpp

@@ -9,8 +9,8 @@ namespace BansheeEngine
 	CommandQueueBase::CommandQueueBase(BS_THREAD_ID_TYPE threadId)
 		:mMyThreadId(threadId), mMaxDebugIdx(0)
 	{
-		mAsyncOpSyncData = bs_shared_ptr<AsyncOpSyncData>();
-		mCommands = bs_new<BansheeEngine::Queue<QueuedCommand>, PoolAlloc>();
+		mAsyncOpSyncData = bs_shared_ptr_new<AsyncOpSyncData>();
+		mCommands = bs_new<BansheeEngine::Queue<QueuedCommand>>();
 
 		{
 			BS_LOCK_MUTEX(CommandQueueBreakpointMutex);
@@ -87,7 +87,7 @@ namespace BansheeEngine
 		}
 		else
 		{
-			mCommands = bs_new<BansheeEngine::Queue<QueuedCommand>, PoolAlloc>();
+			mCommands = bs_new<BansheeEngine::Queue<QueuedCommand>>();
 		}
 
 		return oldCommands;

+ 1 - 1
BansheeCore/Source/BsCoreApplication.cpp

@@ -367,7 +367,7 @@ namespace BansheeEngine
 
 	ShaderIncludeHandlerPtr CoreApplication::getShaderIncludeHandler() const
 	{
-		return bs_shared_ptr<DefaultShaderIncludeHandler>();
+		return bs_shared_ptr_new<DefaultShaderIncludeHandler>();
 	}
 
 	CoreApplication& gCoreApplication()

+ 2 - 2
BansheeCore/Source/BsCoreRenderer.cpp

@@ -16,13 +16,13 @@ namespace BansheeEngine
 
 	RendererMeshDataPtr CoreRenderer::_createMeshData(UINT32 numVertices, UINT32 numIndices, VertexLayout layout, IndexType indexType)
 	{
-		return bs_shared_ptr<RendererMeshData, PoolAlloc>(new (bs_alloc<RendererMeshData, PoolAlloc>()) 
+		return bs_shared_ptr<RendererMeshData>(new (bs_alloc<RendererMeshData>()) 
 			RendererMeshData(numVertices, numIndices, layout, indexType));
 	}
 
 	RendererMeshDataPtr CoreRenderer::_createMeshData(const MeshDataPtr& meshData)
 	{
-		return bs_shared_ptr<RendererMeshData, PoolAlloc>(new (bs_alloc<RendererMeshData, PoolAlloc>())
+		return bs_shared_ptr<RendererMeshData>(new (bs_alloc<RendererMeshData>())
 			RendererMeshData(meshData));
 	}
 

+ 1 - 1
BansheeCore/Source/BsCoreThread.cpp

@@ -130,7 +130,7 @@ namespace BansheeEngine
 	{
 		if(mAccessor == nullptr)
 		{
-			CoreAccessorPtr newAccessor = bs_shared_ptr<CoreThreadAccessor<CommandQueueNoSync>>(BS_THREAD_CURRENT_ID);
+			CoreAccessorPtr newAccessor = bs_shared_ptr_new<CoreThreadAccessor<CommandQueueNoSync>>(BS_THREAD_CURRENT_ID);
 			mAccessor = bs_new<AccessorContainer>();
 			mAccessor->accessor = newAccessor;
 			mAccessor->isMain = BS_THREAD_CURRENT_ID == mSimThreadId;

+ 2 - 2
BansheeCore/Source/BsFontManager.cpp

@@ -5,7 +5,7 @@ namespace BansheeEngine
 {
 	FontPtr FontManager::create(const Vector<FontData>& fontData) const
 	{
-		FontPtr newFont = bs_core_ptr<Font, PoolAlloc>(new (bs_alloc<Font, PoolAlloc>()) Font());
+		FontPtr newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font());
 		newFont->_setThisPtr(newFont);
 		newFont->initialize(fontData);
 
@@ -14,7 +14,7 @@ namespace BansheeEngine
 
 	FontPtr FontManager::_createEmpty() const
 	{
-		FontPtr newFont = bs_core_ptr<Font, PoolAlloc>(new (bs_alloc<Font, PoolAlloc>()) Font());
+		FontPtr newFont = bs_core_ptr<Font>(new (bs_alloc<Font>()) Font());
 		newFont->_setThisPtr(newFont);
 
 		return newFont;

+ 1 - 1
BansheeCore/Source/BsGameObject.cpp

@@ -13,7 +13,7 @@ namespace BansheeEngine
 
 	void GameObject::initialize(const std::shared_ptr<GameObject>& object, UINT64 instanceId)
 	{
-		mInstanceData = bs_shared_ptr<GameObjectInstanceData>();
+		mInstanceData = bs_shared_ptr_new<GameObjectInstanceData>();
 		mInstanceData->object = object;
 		mInstanceData->mInstanceId = instanceId;
 	}

+ 3 - 3
BansheeCore/Source/BsGameObjectHandle.cpp

@@ -13,17 +13,17 @@ namespace BansheeEngine
 
 	GameObjectHandleBase::GameObjectHandleBase(const std::shared_ptr<GameObject> ptr)
 	{
-		mData = bs_shared_ptr<GameObjectHandleData, PoolAlloc>(ptr->mInstanceData);
+		mData = bs_shared_ptr_new<GameObjectHandleData>(ptr->mInstanceData);
 	}
 
 	GameObjectHandleBase::GameObjectHandleBase(std::nullptr_t ptr)
 	{
-		mData = bs_shared_ptr<GameObjectHandleData, PoolAlloc>(nullptr);
+		mData = bs_shared_ptr_new<GameObjectHandleData>(nullptr);
 	}
 
 	GameObjectHandleBase::GameObjectHandleBase()
 	{
-		mData = bs_shared_ptr<GameObjectHandleData, PoolAlloc>(nullptr);
+		mData = bs_shared_ptr_new<GameObjectHandleData>(nullptr);
 	}
 
 	void GameObjectHandleBase::_resolve(const GameObjectHandleBase& object) 

+ 3 - 3
BansheeCore/Source/BsGpuBuffer.cpp

@@ -29,7 +29,7 @@ namespace BansheeEngine
 		for (auto iter = mBufferViews.begin(); iter != mBufferViews.end(); ++iter)
 		{
 			destroyView(iter->second->view);
-			bs_delete<PoolAlloc>(iter->second);
+			bs_delete(iter->second);
 		}
 
 		mBufferViews.clear();
@@ -50,7 +50,7 @@ namespace BansheeEngine
 		{
 			GpuBufferView* newView = buffer->createView();
 			newView->initialize(buffer, key);
-			buffer->mBufferViews[key] = bs_new<GpuBufferReference, PoolAlloc>(newView);
+			buffer->mBufferViews[key] = bs_new<GpuBufferReference>(newView);
 
 			iterFind = buffer->mBufferViews.find(key);
 		}
@@ -78,7 +78,7 @@ namespace BansheeEngine
 			buffer->mBufferViews.erase(iterFind);
 
 			buffer->destroyView(toRemove->view);
-			bs_delete<PoolAlloc>(toRemove);
+			bs_delete(toRemove);
 		}
 	}
 

+ 2 - 2
BansheeCore/Source/BsGpuParamBlockBuffer.cpp

@@ -173,7 +173,7 @@ namespace BansheeEngine
 	GenericGpuParamBlockBufferCore::~GenericGpuParamBlockBufferCore()
 	{
 		if (mData != nullptr)
-			bs_free<ScratchAlloc>(mData);
+			bs_free(mData);
 	}
 
 	void GenericGpuParamBlockBufferCore::writeToGPU(const UINT8* data)
@@ -189,7 +189,7 @@ namespace BansheeEngine
 	void GenericGpuParamBlockBufferCore::initialize()
 	{
 		if (mSize > 0)
-			mData = (UINT8*)bs_alloc<ScratchAlloc>(mSize);
+			mData = (UINT8*)bs_alloc(mSize);
 		else
 			mData = nullptr;
 

+ 3 - 3
BansheeCore/Source/BsGpuParams.cpp

@@ -442,7 +442,7 @@ UINT32 GpuParamsBase::getDataParamSize(const String& name) const
 	SPtr<GpuParamsCore> GpuParamsCore::create(const GpuParamDescPtr& paramDesc, bool transposeMatrices)
 	{
 		GpuParamsCore* params = new (bs_alloc<GpuParamsCore>()) GpuParamsCore(paramDesc, transposeMatrices);
-		SPtr<GpuParamsCore> paramsPtr = bs_shared_ptr<GpuParamsCore, GenAlloc>(params);
+		SPtr<GpuParamsCore> paramsPtr = bs_shared_ptr<GpuParamsCore>(params);
 		paramsPtr->_setThisPtr(paramsPtr);
 
 		return paramsPtr;
@@ -468,7 +468,7 @@ UINT32 GpuParamsBase::getDataParamSize(const String& name) const
 	{
 		GpuParamsCore* obj = new (bs_alloc<GpuParamsCore>()) GpuParamsCore(mParamDesc, mTransposeMatrices);
 
-		SPtr<CoreObjectCore> coreObj = bs_shared_ptr<GpuParamsCore, GenAlloc>(obj);
+		SPtr<CoreObjectCore> coreObj = bs_shared_ptr<GpuParamsCore>(obj);
 		coreObj->_setThisPtr(coreObj);
 
 		return coreObj;
@@ -487,7 +487,7 @@ UINT32 GpuParamsBase::getDataParamSize(const String& name) const
 	SPtr<GpuParams> GpuParams::create(const GpuParamDescPtr& paramDesc, bool transposeMatrices)
 	{
 		GpuParams* params = new (bs_alloc<GpuParams>()) GpuParams(paramDesc, transposeMatrices);
-		SPtr<GpuParams> paramsPtr = bs_core_ptr<GpuParams, GenAlloc>(params);
+		SPtr<GpuParams> paramsPtr = bs_core_ptr<GpuParams>(params);
 		paramsPtr->_setThisPtr(paramsPtr);
 		paramsPtr->initialize();
 		

+ 1 - 1
BansheeCore/Source/BsGpuProgram.cpp

@@ -22,7 +22,7 @@ namespace BansheeEngine
 		: mProperties(source, entryPoint, gptype, profile), mIsCompiled(false),
 		mNeedsAdjacencyInfo(isAdjacencyInfoRequired)
 	{
-		mParametersDesc = bs_shared_ptr<GpuParamDesc>();
+		mParametersDesc = bs_shared_ptr_new<GpuParamDesc>();
 	}
 
 	bool GpuProgramCore::isSupported() const

+ 7 - 7
BansheeCore/Source/BsGpuProgramManager.cpp

@@ -36,23 +36,23 @@ namespace BansheeEngine
 		NullProgramFactory() {}
 		~NullProgramFactory() {}
 
-		const String& getLanguage() const 
+		const String& getLanguage() const override
 		{ 
 			return sNullLang;
 		}
 
 		SPtr<GpuProgramCore> create(const String& source, const String& entryPoint, GpuProgramType gptype, 
-			GpuProgramProfile profile, bool requiresAdjacencyInformation)
+			GpuProgramProfile profile, bool requiresAdjacencyInformation) override
 		{
-			SPtr<NullProgramCore> ret = bs_shared_ptr<NullProgramCore>();
+			SPtr<NullProgramCore> ret = bs_shared_ptr_new<NullProgramCore>();
 			ret->_setThisPtr(ret);
 
 			return ret;
 		}
 
-		SPtr<GpuProgramCore> create(GpuProgramType type)
+		SPtr<GpuProgramCore> create(GpuProgramType type) override
 		{
-			SPtr<NullProgramCore> ret = bs_shared_ptr<NullProgramCore>();
+			SPtr<NullProgramCore> ret = bs_shared_ptr_new<NullProgramCore>();
 			ret->_setThisPtr(ret);
 
 			return ret;
@@ -64,7 +64,7 @@ namespace BansheeEngine
 		bool requiresAdjacencyInformation)
 	{
 		GpuProgram* program = new (bs_alloc<GpuProgram>()) GpuProgram(source, entryPoint, language, gptype, profile, requiresAdjacencyInformation);
-		GpuProgramPtr ret = bs_core_ptr<GpuProgram, GenAlloc>(program);
+		GpuProgramPtr ret = bs_core_ptr<GpuProgram>(program);
 		ret->_setThisPtr(ret);
 		ret->initialize();
 
@@ -74,7 +74,7 @@ namespace BansheeEngine
 	GpuProgramPtr GpuProgramManager::createEmpty(const String& language, GpuProgramType type)
 	{
 		GpuProgram* program = new (bs_alloc<GpuProgram>()) GpuProgram("", "", language, GPT_VERTEX_PROGRAM, GPP_VS_1_1, false);
-		GpuProgramPtr ret = bs_core_ptr<GpuProgram, GenAlloc>(program);
+		GpuProgramPtr ret = bs_core_ptr<GpuProgram>(program);
 		ret->_setThisPtr(ret);
 
 		return ret;

+ 2 - 2
BansheeCore/Source/BsGpuResourceData.cpp

@@ -62,7 +62,7 @@ namespace BansheeEngine
 
 		freeInternalBuffer();
 
-		mData = (UINT8*)bs_alloc<ScratchAlloc>(size);
+		mData = (UINT8*)bs_alloc(size);
 		mOwnsData = true;
 	}
 
@@ -79,7 +79,7 @@ namespace BansheeEngine
 		}
 #endif
 
-		bs_free<ScratchAlloc>(mData);
+		bs_free(mData);
 		mData = nullptr;
 	}
 

+ 8 - 8
BansheeCore/Source/BsHardwareBufferManager.cpp

@@ -16,9 +16,9 @@ namespace BansheeEngine
 
 	VertexDeclarationPtr HardwareBufferManager::createVertexDeclaration(const List<VertexElement>& elements)
     {
-		VertexDeclaration* decl = new (bs_alloc<VertexDeclaration, GenAlloc>()) VertexDeclaration(elements);
+		VertexDeclaration* decl = new (bs_alloc<VertexDeclaration>()) VertexDeclaration(elements);
 
-		VertexDeclarationPtr declPtr = bs_core_ptr<VertexDeclaration, GenAlloc>(decl);
+		VertexDeclarationPtr declPtr = bs_core_ptr<VertexDeclaration>(decl);
 		declPtr->_setThisPtr(declPtr);
 		declPtr->initialize();
 
@@ -29,7 +29,7 @@ namespace BansheeEngine
 	{
 		assert (numVerts > 0);
 
-		VertexBufferPtr vbuf = bs_core_ptr<VertexBuffer, GenAlloc>(new (bs_alloc<VertexBuffer>()) VertexBuffer(vertexSize, numVerts, usage, streamOut));
+		VertexBufferPtr vbuf = bs_core_ptr<VertexBuffer>(new (bs_alloc<VertexBuffer>()) VertexBuffer(vertexSize, numVerts, usage, streamOut));
 		vbuf->_setThisPtr(vbuf);
 		vbuf->initialize();
 		return vbuf;
@@ -39,7 +39,7 @@ namespace BansheeEngine
 	{
 		assert (numIndexes > 0);
 
-		IndexBufferPtr ibuf = bs_core_ptr<IndexBuffer, GenAlloc>(new (bs_alloc<IndexBuffer>()) IndexBuffer(itype, numIndexes, usage));
+		IndexBufferPtr ibuf = bs_core_ptr<IndexBuffer>(new (bs_alloc<IndexBuffer>()) IndexBuffer(itype, numIndexes, usage));
 		ibuf->_setThisPtr(ibuf);
 		ibuf->initialize();
 		return ibuf;
@@ -48,7 +48,7 @@ namespace BansheeEngine
 
 	GpuParamBlockBufferPtr HardwareBufferManager::createGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage)
 	{
-		GpuParamBlockBufferPtr paramBlockPtr = bs_core_ptr<GpuParamBlockBuffer, GenAlloc>(new (bs_alloc<GpuParamBlockBuffer>()) GpuParamBlockBuffer(size, usage));
+		GpuParamBlockBufferPtr paramBlockPtr = bs_core_ptr<GpuParamBlockBuffer>(new (bs_alloc<GpuParamBlockBuffer>()) GpuParamBlockBuffer(size, usage));
 		paramBlockPtr->_setThisPtr(paramBlockPtr);
 		paramBlockPtr->initialize();
 		return paramBlockPtr;
@@ -57,7 +57,7 @@ namespace BansheeEngine
 	GpuBufferPtr HardwareBufferManager::createGpuBuffer(UINT32 elementCount, UINT32 elementSize, 
 		GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite, bool useCounter)
 	{
-		GpuBufferPtr gbuf = bs_core_ptr<GpuBuffer, GenAlloc>(new (bs_alloc<GpuBuffer>()) GpuBuffer(elementCount, elementSize, type, usage, randomGpuWrite, useCounter));
+		GpuBufferPtr gbuf = bs_core_ptr<GpuBuffer>(new (bs_alloc<GpuBuffer>()) GpuBuffer(elementCount, elementSize, type, usage, randomGpuWrite, useCounter));
 		gbuf->_setThisPtr(gbuf);
 		gbuf->initialize();
 
@@ -110,9 +110,9 @@ namespace BansheeEngine
 
 	SPtr<VertexDeclarationCore> HardwareBufferCoreManager::createVertexDeclarationInternal(const List<VertexElement>& elements)
 	{
-		VertexDeclarationCore* decl = new (bs_alloc<VertexDeclarationCore, GenAlloc>()) VertexDeclarationCore(elements);
+		VertexDeclarationCore* decl = new (bs_alloc<VertexDeclarationCore>()) VertexDeclarationCore(elements);
 
-		SPtr<VertexDeclarationCore> ret = bs_shared_ptr<VertexDeclarationCore, GenAlloc>(decl);
+		SPtr<VertexDeclarationCore> ret = bs_shared_ptr<VertexDeclarationCore>(decl);
 		ret->_setThisPtr(ret);
 
 		return ret;

+ 1 - 1
BansheeCore/Source/BsInput.cpp

@@ -21,7 +21,7 @@ namespace BansheeEngine
 	Input::Input()
 		:mLastPositionSet(false), mPointerDoubleClicked(false)
 	{ 
-		mOSInputHandler = bs_shared_ptr<OSInputHandler>();
+		mOSInputHandler = bs_shared_ptr_new<OSInputHandler>();
 
 		mOSInputHandler->onCharInput.connect(std::bind(&Input::charInput, this, _1));
 		mOSInputHandler->onCursorMoved.connect(std::bind(&Input::cursorMoved, this, _1));

+ 8 - 8
BansheeCore/Source/BsMaterial.cpp

@@ -35,7 +35,7 @@ namespace BansheeEngine
 
 	SPtr<PassParametersCore> convertParamsToCore(const SPtr<PassParameters>& passParams)
 	{
-		SPtr<PassParametersCore> passParameters = bs_shared_ptr<PassParametersCore>();
+		SPtr<PassParametersCore> passParameters = bs_shared_ptr_new<PassParametersCore>();
 
 		if (passParams->mVertParams != nullptr)
 			passParameters->mVertParams = passParams->mVertParams->getCore();
@@ -483,7 +483,7 @@ namespace BansheeEngine
 		}
 
 		const String& gpuVarName = iterFind->second;
-		SPtr<Vector<TGpuParamStruct<Core>>> gpuParams = bs_shared_ptr<Vector<TGpuParamStruct<Core>>>();
+		SPtr<Vector<TGpuParamStruct<Core>>> gpuParams = bs_shared_ptr_new<Vector<TGpuParamStruct<Core>>>();
 
 		for (auto iter = mParametersPerPass.begin(); iter != mParametersPerPass.end(); ++iter)
 		{
@@ -519,7 +519,7 @@ namespace BansheeEngine
 		}
 
 		const String& gpuVarName = iterFind->second;
-		SPtr<Vector<TGpuParamTexture<Core>>> gpuParams = bs_shared_ptr<Vector<TGpuParamTexture<Core>>>();
+		SPtr<Vector<TGpuParamTexture<Core>>> gpuParams = bs_shared_ptr_new<Vector<TGpuParamTexture<Core>>>();
 
 		for (auto iter = mParametersPerPass.begin(); iter != mParametersPerPass.end(); ++iter)
 		{
@@ -555,7 +555,7 @@ namespace BansheeEngine
 		}
 
 		const String& gpuVarName = iterFind->second;
-		SPtr<Vector<TGpuParamLoadStoreTexture<Core>>> gpuParams = bs_shared_ptr<Vector<TGpuParamLoadStoreTexture<Core>>>();
+		SPtr<Vector<TGpuParamLoadStoreTexture<Core>>> gpuParams = bs_shared_ptr_new<Vector<TGpuParamLoadStoreTexture<Core>>>();
 
 		for (auto iter = mParametersPerPass.begin(); iter != mParametersPerPass.end(); ++iter)
 		{
@@ -591,7 +591,7 @@ namespace BansheeEngine
 		}
 
 		const String& gpuVarName = iterFind->second;
-		SPtr<Vector<TGpuParamSampState<Core>>> gpuParams = bs_shared_ptr<Vector<TGpuParamSampState<Core>>>();
+		SPtr<Vector<TGpuParamSampState<Core>>> gpuParams = bs_shared_ptr_new<Vector<TGpuParamSampState<Core>>>();
 		for (auto iter = mParametersPerPass.begin(); iter != mParametersPerPass.end(); ++iter)
 		{
 			SPtr<TPassParameters<Core>> params = *iter;
@@ -898,7 +898,7 @@ namespace BansheeEngine
 		}
 
 		const String& gpuVarName = iterFind->second;
-		SPtr<Vector<TGpuDataParam<T, Core>>> gpuParams = bs_shared_ptr<Vector<TGpuDataParam<T, Core>>>();
+		SPtr<Vector<TGpuDataParam<T, Core>>> gpuParams = bs_shared_ptr_new<Vector<TGpuDataParam<T, Core>>>();
 
 		for (auto iter = mParametersPerPass.begin(); iter != mParametersPerPass.end(); ++iter)
 		{
@@ -1039,7 +1039,7 @@ namespace BansheeEngine
 	SPtr<MaterialCore> MaterialCore::create(const SPtr<ShaderCore>& shader)
 	{
 		MaterialCore* material = new (bs_alloc<MaterialCore>()) MaterialCore(shader);
-		SPtr<MaterialCore> materialPtr = bs_shared_ptr<MaterialCore, GenAlloc>(material);
+		SPtr<MaterialCore> materialPtr = bs_shared_ptr<MaterialCore>(material);
 		materialPtr->_setThisPtr(materialPtr);
 		materialPtr->initialize();
 
@@ -1112,7 +1112,7 @@ namespace BansheeEngine
 		if (material == nullptr)
 			material = new (bs_alloc<MaterialCore>()) MaterialCore(shader);
 
-		SPtr<MaterialCore> materialPtr = bs_shared_ptr<MaterialCore, GenAlloc>(material);
+		SPtr<MaterialCore> materialPtr = bs_shared_ptr<MaterialCore>(material);
 		materialPtr->_setThisPtr(materialPtr);
 
 		return materialPtr;

+ 3 - 3
BansheeCore/Source/BsMaterialManager.cpp

@@ -5,7 +5,7 @@ namespace BansheeEngine
 {
 	MaterialPtr MaterialManager::create() const
 	{
-		MaterialPtr newMat = bs_core_ptr<Material, PoolAlloc>(new (bs_alloc<Material, PoolAlloc>()) Material());
+		MaterialPtr newMat = bs_core_ptr<Material>(new (bs_alloc<Material>()) Material());
 		newMat->_setThisPtr(newMat);
 		newMat->initialize();
 
@@ -14,7 +14,7 @@ namespace BansheeEngine
 
 	MaterialPtr MaterialManager::create(const HShader& shader) const
 	{
-		MaterialPtr newMat = bs_core_ptr<Material, PoolAlloc>(new (bs_alloc<Material, PoolAlloc>()) Material(shader));
+		MaterialPtr newMat = bs_core_ptr<Material>(new (bs_alloc<Material>()) Material(shader));
 		newMat->_setThisPtr(newMat);
 		newMat->initialize();
 
@@ -23,7 +23,7 @@ namespace BansheeEngine
 
 	MaterialPtr MaterialManager::createEmpty() const
 	{
-		MaterialPtr newMat = bs_core_ptr<Material, PoolAlloc>(new (bs_alloc<Material, PoolAlloc>()) Material());
+		MaterialPtr newMat = bs_core_ptr<Material>(new (bs_alloc<Material>()) Material());
 		newMat->_setThisPtr(newMat);
 
 		return newMat;

+ 1 - 1
BansheeCore/Source/BsMaterialRTTI.cpp

@@ -40,7 +40,7 @@ namespace BansheeEngine
 	void MaterialRTTI::onSerializationStarted(IReflectable* obj)
 	{
 		Material* material = static_cast<Material*>(obj);
-		std::shared_ptr<MaterialParams> params = bs_shared_ptr<MaterialParams, ScratchAlloc>();
+		std::shared_ptr<MaterialParams> params = bs_shared_ptr_new<MaterialParams>();
 
 		HShader shader = material->getShader();
 		if(shader != nullptr)

+ 3 - 3
BansheeCore/Source/BsMesh.cpp

@@ -40,7 +40,7 @@ namespace BansheeEngine
 		mIndexBuffer = HardwareBufferCoreManager::instance().createIndexBuffer(mIndexType,
 			mProperties.mNumIndices, isDynamic ? GBU_DYNAMIC : GBU_STATIC);
 
-		mVertexData = std::shared_ptr<VertexData>(bs_new<VertexData, PoolAlloc>());
+		mVertexData = std::shared_ptr<VertexData>(bs_new<VertexData>());
 
 		mVertexData->vertexCount = mProperties.mNumVertices;
 
@@ -354,7 +354,7 @@ namespace BansheeEngine
 
 	MeshDataPtr Mesh::allocateSubresourceBuffer(UINT32 subresourceIdx) const
 	{
-		MeshDataPtr meshData = bs_shared_ptr<MeshData>(mProperties.mNumVertices, mProperties.mNumIndices, mVertexDesc, mIndexType);
+		MeshDataPtr meshData = bs_shared_ptr_new<MeshData>(mProperties.mNumVertices, mProperties.mNumIndices, mVertexDesc, mIndexType);
 
 		return meshData;
 	}
@@ -386,7 +386,7 @@ namespace BansheeEngine
 		MeshCore* obj = new (bs_alloc<MeshCore>()) MeshCore(mProperties.mNumVertices, mProperties.mNumIndices, 
 			mVertexDesc, mProperties.mSubMeshes, mUsage, mIndexType, mCPUData);
 
-		SPtr<CoreObjectCore> meshCore = bs_shared_ptr<MeshCore, GenAlloc>(obj);
+		SPtr<CoreObjectCore> meshCore = bs_shared_ptr<MeshCore>(obj);
 		meshCore->_setThisPtr(meshCore);
 
 		if ((mUsage & MU_CPUCACHED) == 0)

+ 2 - 2
BansheeCore/Source/BsMeshData.cpp

@@ -67,7 +67,7 @@ namespace BansheeEngine
 			totalIndexCount += meshData->getNumIndices();
 		}
 
-		VertexDataDescPtr vertexData = bs_shared_ptr<VertexDataDesc, PoolAlloc>();
+		VertexDataDescPtr vertexData = bs_shared_ptr_new<VertexDataDesc>();
 		
 		Vector<VertexElement> combinedVertexElements;
 		for(auto& meshData : meshes)
@@ -104,7 +104,7 @@ namespace BansheeEngine
 			}
 		}
 
-		MeshDataPtr combinedMeshData = bs_shared_ptr<MeshData, PoolAlloc>(totalVertexCount, totalIndexCount, vertexData);
+		MeshDataPtr combinedMeshData = bs_shared_ptr_new<MeshData>(totalVertexCount, totalIndexCount, vertexData);
 
 		// Copy indices
 		UINT32 vertexOffset = 0;

+ 4 - 4
BansheeCore/Source/BsMeshHeap.cpp

@@ -290,7 +290,7 @@ namespace BansheeEngine
 	void MeshHeapCore::growVertexBuffer(UINT32 numVertices)
 	{
 		mNumVertices = numVertices;
-		mVertexData = std::shared_ptr<VertexData>(bs_new<VertexData, PoolAlloc>());
+		mVertexData = std::shared_ptr<VertexData>(bs_new<VertexData>());
 
 		mVertexData->vertexCount = mNumVertices;
 		List<VertexElement> elements = mVertexDesc->createElements();
@@ -639,7 +639,7 @@ namespace BansheeEngine
 		const VertexDataDescPtr& vertexDesc, IndexType indexType)
 	{
 		MeshHeap* meshHeap = new (bs_alloc<MeshHeap>()) MeshHeap(numVertices, numIndices, vertexDesc, indexType); 
-		MeshHeapPtr meshHeapPtr = bs_core_ptr<MeshHeap, GenAlloc>(meshHeap);
+		MeshHeapPtr meshHeapPtr = bs_core_ptr<MeshHeap>(meshHeap);
 
 		meshHeapPtr->_setThisPtr(meshHeapPtr);
 		meshHeapPtr->initialize();
@@ -653,7 +653,7 @@ namespace BansheeEngine
 
 		MeshHeapPtr thisPtr = std::static_pointer_cast<MeshHeap>(getThisPtr());
 		TransientMesh* transientMesh = new (bs_alloc<TransientMesh>()) TransientMesh(thisPtr, meshIdx, meshData->getNumVertices(), meshData->getNumIndices(), drawOp); 
-		TransientMeshPtr transientMeshPtr = bs_core_ptr<TransientMesh, GenAlloc>(transientMesh);
+		TransientMeshPtr transientMeshPtr = bs_core_ptr<TransientMesh>(transientMesh);
 
 		transientMeshPtr->_setThisPtr(transientMeshPtr);
 		transientMeshPtr->initialize();
@@ -687,7 +687,7 @@ namespace BansheeEngine
 		MeshHeapCore* obj = new (bs_alloc<MeshHeapCore>()) MeshHeapCore(mNumVertices, mNumIndices,
 			mVertexDesc, mIndexType);
 
-		SPtr<MeshHeapCore> corePtr = bs_shared_ptr<MeshHeapCore, GenAlloc>(obj);
+		SPtr<MeshHeapCore> corePtr = bs_shared_ptr<MeshHeapCore>(obj);
 		obj->_setThisPtr(corePtr);
 
 		return corePtr;

+ 7 - 7
BansheeCore/Source/BsMeshManager.cpp

@@ -20,7 +20,7 @@ namespace BansheeEngine
 	MeshPtr MeshManager::create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, 
 		int usage, DrawOperationType drawOp, IndexType indexType)
 	{
-		MeshPtr mesh = bs_core_ptr<Mesh, PoolAlloc>(new (bs_alloc<Mesh, PoolAlloc>()) 
+		MeshPtr mesh = bs_core_ptr<Mesh>(new (bs_alloc<Mesh>()) 
 			Mesh(numVertices, numIndices, vertexDesc, usage, drawOp, indexType));
 		mesh->_setThisPtr(mesh);
 		mesh->initialize();
@@ -31,7 +31,7 @@ namespace BansheeEngine
 	MeshPtr MeshManager::create(UINT32 numVertices, UINT32 numIndices, const VertexDataDescPtr& vertexDesc, 
 		const Vector<SubMesh>& subMeshes, int usage, IndexType indexType)
 	{
-		MeshPtr mesh = bs_core_ptr<Mesh, PoolAlloc>(new (bs_alloc<Mesh, PoolAlloc>())
+		MeshPtr mesh = bs_core_ptr<Mesh>(new (bs_alloc<Mesh>())
 			Mesh(numVertices, numIndices, vertexDesc, subMeshes, usage, indexType));
 		mesh->_setThisPtr(mesh);
 		mesh->initialize();
@@ -41,7 +41,7 @@ namespace BansheeEngine
 
 	MeshPtr MeshManager::create(const MeshDataPtr& initialData, int usage, DrawOperationType drawOp)
 	{
-		MeshPtr mesh = bs_core_ptr<Mesh, PoolAlloc>(new (bs_alloc<Mesh, PoolAlloc>()) Mesh(initialData, usage, drawOp));
+		MeshPtr mesh = bs_core_ptr<Mesh>(new (bs_alloc<Mesh>()) Mesh(initialData, usage, drawOp));
 		mesh->_setThisPtr(mesh);
 		mesh->initialize();
 
@@ -50,7 +50,7 @@ namespace BansheeEngine
 
 	MeshPtr MeshManager::create(const MeshDataPtr& initialData, const Vector<SubMesh>& subMeshes, int usage)
 	{
-		MeshPtr mesh = bs_core_ptr<Mesh, PoolAlloc>(new (bs_alloc<Mesh, PoolAlloc>()) Mesh(initialData, subMeshes, usage));
+		MeshPtr mesh = bs_core_ptr<Mesh>(new (bs_alloc<Mesh>()) Mesh(initialData, subMeshes, usage));
 		mesh->_setThisPtr(mesh);
 		mesh->initialize();
 
@@ -59,7 +59,7 @@ namespace BansheeEngine
 
 	MeshPtr MeshManager::createEmpty()
 	{
-		MeshPtr mesh = bs_core_ptr<Mesh, PoolAlloc>(new (bs_alloc<Mesh, PoolAlloc>()) Mesh());
+		MeshPtr mesh = bs_core_ptr<Mesh>(new (bs_alloc<Mesh>()) Mesh());
 		mesh->_setThisPtr(mesh);
 
 		return mesh;
@@ -67,10 +67,10 @@ namespace BansheeEngine
 
 	void MeshManager::onStartUp()
 	{
-		VertexDataDescPtr vertexDesc = bs_shared_ptr<VertexDataDesc>();
+		VertexDataDescPtr vertexDesc = bs_shared_ptr_new<VertexDataDesc>();
 		vertexDesc->addVertElem(VET_FLOAT3, VES_POSITION);
 
-		mDummyMeshData = bs_shared_ptr<MeshData>(1, 3, vertexDesc);
+		mDummyMeshData = bs_shared_ptr_new<MeshData>(1, 3, vertexDesc);
 
 		auto vecIter = mDummyMeshData->getVec3DataIter(VES_POSITION);
 		vecIter.setValue(Vector3(0, 0, 0));

+ 4 - 4
BansheeCore/Source/BsPass.cpp

@@ -85,7 +85,7 @@ namespace BansheeEngine
 	SPtr<PassCore> PassCore::create(const PASS_DESC_CORE& desc)
 	{
 		PassCore* newPass = new (bs_alloc<PassCore>()) PassCore(desc);
-		SPtr<PassCore> newPassPtr = bs_shared_ptr<PassCore, GenAlloc>(newPass);
+		SPtr<PassCore> newPassPtr = bs_shared_ptr<PassCore>(newPass);
 		newPassPtr->_setThisPtr(newPassPtr);
 		newPassPtr->initialize();
 
@@ -107,7 +107,7 @@ namespace BansheeEngine
 		convertPassDesc(mData, desc);
 
 		PassCore* pass = new (bs_alloc<PassCore>()) PassCore(desc);
-		SPtr<PassCore> passPtr = bs_shared_ptr<PassCore, GenAlloc>(pass);
+		SPtr<PassCore> passPtr = bs_shared_ptr<PassCore>(pass);
 		passPtr->_setThisPtr(passPtr);
 
 		return passPtr;
@@ -157,7 +157,7 @@ namespace BansheeEngine
 	PassPtr Pass::create(const PASS_DESC& desc)
 	{
 		Pass* newPass = new (bs_alloc<Pass>()) Pass(desc);
-		PassPtr newPassPtr = bs_core_ptr<Pass, GenAlloc>(newPass);
+		PassPtr newPassPtr = bs_core_ptr<Pass>(newPass);
 		newPassPtr->_setThisPtr(newPassPtr);
 		newPassPtr->initialize();
 
@@ -167,7 +167,7 @@ namespace BansheeEngine
 	PassPtr Pass::createEmpty()
 	{
 		Pass* newPass = new (bs_alloc<Pass>()) Pass();
-		PassPtr newPassPtr = bs_core_ptr<Pass, GenAlloc>(newPass);
+		PassPtr newPassPtr = bs_core_ptr<Pass>(newPass);
 		newPassPtr->_setThisPtr(newPassPtr);
 
 		return newPassPtr;

+ 2 - 2
BansheeCore/Source/BsPixelData.cpp

@@ -176,12 +176,12 @@ namespace BansheeEngine
 
 	PixelDataPtr PixelData::create(const PixelVolume &extents, PixelFormat pixelFormat)
 	{
-		return bs_shared_ptr<PixelData>(extents, pixelFormat);
+		return bs_shared_ptr_new<PixelData>(extents, pixelFormat);
 	}
 
 	PixelDataPtr PixelData::create(UINT32 width, UINT32 height, UINT32 depth, PixelFormat pixelFormat)
 	{
-		return bs_shared_ptr<PixelData>(width, height, depth, pixelFormat);
+		return bs_shared_ptr_new<PixelData>(width, height, depth, pixelFormat);
 	}
 
 	UINT32 PixelData::getInternalBufferSize() const

+ 3 - 3
BansheeCore/Source/BsPixelUtil.cpp

@@ -1715,7 +1715,7 @@ namespace BansheeEngine
 		UINT32 curHeight = src.getHeight();
 		for (UINT32 i = 0; i < numMips; i++)
 		{
-			argbMipBuffers.push_back(bs_shared_ptr<PixelData>(curWidth, curHeight, 1, PF_A8R8G8B8));
+			argbMipBuffers.push_back(bs_shared_ptr_new<PixelData>(curWidth, curHeight, 1, PF_A8R8G8B8));
 			argbMipBuffers.back()->allocateInternalBuffer();
 
 			if (curWidth > 1) 
@@ -1725,7 +1725,7 @@ namespace BansheeEngine
 				curHeight = curHeight / 2;
 		}
 
-		argbMipBuffers.push_back(bs_shared_ptr<PixelData>(curWidth, curHeight, 1, PF_A8R8G8B8));
+		argbMipBuffers.push_back(bs_shared_ptr_new<PixelData>(curWidth, curHeight, 1, PF_A8R8G8B8));
 		argbMipBuffers.back()->allocateInternalBuffer();
 
 		NVTTMipmapOutputHandler outputHandler(argbMipBuffers);
@@ -1744,7 +1744,7 @@ namespace BansheeEngine
 		for (UINT32 i = 0; i < (UINT32)argbMipBuffers.size(); i++)
 		{
 			PixelDataPtr argbBuffer = argbMipBuffers[i];
-			PixelDataPtr outputBuffer = bs_shared_ptr<PixelData>(argbBuffer->getWidth(), argbBuffer->getHeight(), 1, src.getFormat());
+			PixelDataPtr outputBuffer = bs_shared_ptr_new<PixelData>(argbBuffer->getWidth(), argbBuffer->getHeight(), 1, src.getFormat());
 			outputBuffer->allocateInternalBuffer();
 
 			bulkPixelConversion(*argbBuffer, *outputBuffer);

+ 1 - 1
BansheeCore/Source/BsPrefab.cpp

@@ -27,7 +27,7 @@ namespace BansheeEngine
 
 	PrefabPtr Prefab::createEmpty()
 	{
-		PrefabPtr newPrefab = bs_core_ptr<Prefab, PoolAlloc>(new (bs_alloc<Prefab, PoolAlloc>()) Prefab());
+		PrefabPtr newPrefab = bs_core_ptr<Prefab>(new (bs_alloc<Prefab>()) Prefab());
 		newPrefab->_setThisPtr(newPrefab);
 
 		return newPrefab;

+ 9 - 9
BansheeCore/Source/BsPrefabDiff.cpp

@@ -35,7 +35,7 @@ namespace BansheeEngine
 		Vector<RenamedGameObject> renamedObjects;
 		renameInstanceIds(prefab, instance, renamedObjects);
 
-		SPtr<PrefabDiff> output = bs_shared_ptr<PrefabDiff>();
+		SPtr<PrefabDiff> output = bs_shared_ptr_new<PrefabDiff>();
 		output->mRoot = generateDiff(prefab, instance);
 
 		restoreInstanceIds(renamedObjects);
@@ -140,7 +140,7 @@ namespace BansheeEngine
 		if (prefab->getName() != instance->getName())
 		{
 			if (output == nullptr)
-				output = bs_shared_ptr<PrefabObjectDiff>();
+				output = bs_shared_ptr_new<PrefabObjectDiff>();
 		}
 
 		UINT32 prefabChildCount = prefab->getNumChildren();
@@ -170,7 +170,7 @@ namespace BansheeEngine
 				if (childDiff != nullptr)
 				{
 					if (output == nullptr)
-						output = bs_shared_ptr<PrefabObjectDiff>();
+						output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 					output->childDiffs.push_back(childDiff);
 				}
@@ -178,7 +178,7 @@ namespace BansheeEngine
 			else
 			{
 				if (output == nullptr)
-					output = bs_shared_ptr<PrefabObjectDiff>();
+					output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 				output->removedChildren.push_back(prefabChild->getLinkId());
 			}	
@@ -210,7 +210,7 @@ namespace BansheeEngine
 				SPtr<SerializedObject> obj = bs._encodeIntermediate(instanceChild.get());
 
 				if (output == nullptr)
-					output = bs_shared_ptr<PrefabObjectDiff>();
+					output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 				output->addedChildren.push_back(obj);
 			}
@@ -244,7 +244,7 @@ namespace BansheeEngine
 
 					if (diff != nullptr)
 					{
-						childDiff = bs_shared_ptr<PrefabComponentDiff>();
+						childDiff = bs_shared_ptr_new<PrefabComponentDiff>();
 						childDiff->id = prefabComponent->getLinkId();
 						childDiff->data = diff;
 					}
@@ -259,7 +259,7 @@ namespace BansheeEngine
 				if (childDiff != nullptr)
 				{
 					if (output == nullptr)
-						output = bs_shared_ptr<PrefabObjectDiff>();
+						output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 					output->componentDiffs.push_back(childDiff);
 				}
@@ -267,7 +267,7 @@ namespace BansheeEngine
 			else
 			{
 				if (output == nullptr)
-					output = bs_shared_ptr<PrefabObjectDiff>();
+					output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 				output->removedComponents.push_back(prefabComponent->getLinkId());
 			}
@@ -299,7 +299,7 @@ namespace BansheeEngine
 				SPtr<SerializedObject> obj = bs._encodeIntermediate(instanceComponent.get());
 
 				if (output == nullptr)
-					output = bs_shared_ptr<PrefabObjectDiff>();
+					output = bs_shared_ptr_new<PrefabObjectDiff>();
 
 				output->addedComponents.push_back(obj);
 			}

+ 1 - 1
BansheeCore/Source/BsProfilerCPU.cpp

@@ -254,7 +254,7 @@ namespace BansheeEngine
 		BS_LOCK_MUTEX(mThreadSync);
 
 		for(auto& threadInfo : mActiveThreads)
-			bs_delete<ProfilerAlloc>(threadInfo);
+			bs_delete<ThreadInfo, ProfilerAlloc>(threadInfo);
 	}
 
 	void ProfilerCPU::beginThread(const char* name)

+ 2 - 2
BansheeCore/Source/BsProfilingManager.cpp

@@ -16,10 +16,10 @@ namespace BansheeEngine
 	ProfilingManager::~ProfilingManager()
 	{
 		if(mSavedSimReports != nullptr)
-			bs_deleteN<ProfilerAlloc>(mSavedSimReports, NUM_SAVED_FRAMES);
+			bs_deleteN<ProfilerReport, ProfilerAlloc>(mSavedSimReports, NUM_SAVED_FRAMES);
 
 		if(mSavedCoreReports != nullptr)
-			bs_deleteN<ProfilerAlloc>(mSavedCoreReports, NUM_SAVED_FRAMES);
+			bs_deleteN<ProfilerReport, ProfilerAlloc>(mSavedCoreReports, NUM_SAVED_FRAMES);
 	}
 
 	void ProfilingManager::_update()

+ 12 - 12
BansheeCore/Source/BsRenderStateManager.cpp

@@ -126,7 +126,7 @@ namespace BansheeEngine
 		SPtr<SamplerState> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_core_ptr<SamplerState, GenAlloc>(new (bs_alloc<SamplerState>()) SamplerState(desc));
+			state = bs_core_ptr<SamplerState>(new (bs_alloc<SamplerState>()) SamplerState(desc));
 			state->_setThisPtr(state);
 			state->initialize();
 
@@ -141,7 +141,7 @@ namespace BansheeEngine
 		SPtr<DepthStencilState> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_core_ptr<DepthStencilState, GenAlloc>(new (bs_alloc<DepthStencilState>()) DepthStencilState(desc));
+			state = bs_core_ptr<DepthStencilState>(new (bs_alloc<DepthStencilState>()) DepthStencilState(desc));
 			state->_setThisPtr(state);
 			state->initialize();
 
@@ -156,7 +156,7 @@ namespace BansheeEngine
 		SPtr<RasterizerState> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_core_ptr<RasterizerState, GenAlloc>(new (bs_alloc<RasterizerState>()) RasterizerState(desc));
+			state = bs_core_ptr<RasterizerState>(new (bs_alloc<RasterizerState>()) RasterizerState(desc));
 			state->_setThisPtr(state);
 			state->initialize();
 
@@ -171,7 +171,7 @@ namespace BansheeEngine
 		SPtr<BlendState> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_core_ptr<BlendState, GenAlloc>(new (bs_alloc<BlendState>()) BlendState(desc));
+			state = bs_core_ptr<BlendState>(new (bs_alloc<BlendState>()) BlendState(desc));
 			state->_setThisPtr(state);
 			state->initialize();
 
@@ -183,7 +183,7 @@ namespace BansheeEngine
 
 	SamplerStatePtr RenderStateManager::_createSamplerStatePtr(const SAMPLER_STATE_DESC& desc) const
 	{
-		SamplerStatePtr samplerState = bs_core_ptr<SamplerState, GenAlloc>(
+		SamplerStatePtr samplerState = bs_core_ptr<SamplerState>(
 			new (bs_alloc<SamplerState>()) SamplerState(desc));
 		samplerState->_setThisPtr(samplerState);
 
@@ -192,7 +192,7 @@ namespace BansheeEngine
 
 	DepthStencilStatePtr RenderStateManager::_createDepthStencilStatePtr(const DEPTH_STENCIL_STATE_DESC& desc) const
 	{
-		DepthStencilStatePtr depthStencilState = bs_core_ptr<DepthStencilState, GenAlloc>(
+		DepthStencilStatePtr depthStencilState = bs_core_ptr<DepthStencilState>(
 			new (bs_alloc<DepthStencilState>()) DepthStencilState(desc));
 		depthStencilState->_setThisPtr(depthStencilState);
 
@@ -201,7 +201,7 @@ namespace BansheeEngine
 
 	RasterizerStatePtr RenderStateManager::_createRasterizerStatePtr(const RASTERIZER_STATE_DESC& desc) const
 	{
-		RasterizerStatePtr rasterizerState = bs_core_ptr<RasterizerState, GenAlloc>(
+		RasterizerStatePtr rasterizerState = bs_core_ptr<RasterizerState>(
 			new (bs_alloc<RasterizerState>()) RasterizerState(desc));
 		rasterizerState->_setThisPtr(rasterizerState);
 
@@ -210,7 +210,7 @@ namespace BansheeEngine
 
 	BlendStatePtr RenderStateManager::_createBlendStatePtr(const BLEND_STATE_DESC& desc) const
 	{
-		BlendStatePtr blendState = bs_core_ptr<BlendState, GenAlloc>(
+		BlendStatePtr blendState = bs_core_ptr<BlendState>(
 			new (bs_alloc<BlendState>()) BlendState(desc));
 		blendState->_setThisPtr(blendState);
 
@@ -318,7 +318,7 @@ namespace BansheeEngine
 		SPtr<SamplerStateCore> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_shared_ptr<SamplerStateCore, GenAlloc>(new (bs_alloc<SamplerStateCore>()) SamplerStateCore(desc));
+			state = bs_shared_ptr<SamplerStateCore>(new (bs_alloc<SamplerStateCore>()) SamplerStateCore(desc));
 			state->_setThisPtr(state);
 
 			notifySamplerStateCreated(desc, state);
@@ -332,7 +332,7 @@ namespace BansheeEngine
 		SPtr<DepthStencilStateCore> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			SPtr<DepthStencilStateCore> state = bs_shared_ptr<DepthStencilStateCore, GenAlloc>(new (bs_alloc<DepthStencilStateCore>()) DepthStencilStateCore(desc));
+			SPtr<DepthStencilStateCore> state = bs_shared_ptr<DepthStencilStateCore>(new (bs_alloc<DepthStencilStateCore>()) DepthStencilStateCore(desc));
 			state->_setThisPtr(state);
 
 			notifyDepthStencilStateCreated(desc, state);
@@ -346,7 +346,7 @@ namespace BansheeEngine
 		SPtr<RasterizerStateCore> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			SPtr<RasterizerStateCore> state = bs_shared_ptr<RasterizerStateCore, GenAlloc>(new (bs_alloc<RasterizerStateCore>()) RasterizerStateCore(desc));
+			SPtr<RasterizerStateCore> state = bs_shared_ptr<RasterizerStateCore>(new (bs_alloc<RasterizerStateCore>()) RasterizerStateCore(desc));
 			state->_setThisPtr(state);
 
 			notifyRasterizerStateCreated(desc, state);
@@ -360,7 +360,7 @@ namespace BansheeEngine
 		SPtr<BlendStateCore> state = findCachedState(desc);
 		if (state == nullptr)
 		{
-			state = bs_shared_ptr<BlendStateCore, GenAlloc>(new (bs_alloc<BlendStateCore>()) BlendStateCore(desc));
+			state = bs_shared_ptr<BlendStateCore>(new (bs_alloc<BlendStateCore>()) BlendStateCore(desc));
 			state->_setThisPtr(state);
 
 			notifyBlendStateCreated(desc, state);

+ 1 - 1
BansheeCore/Source/BsRendererMeshData.cpp

@@ -14,7 +14,7 @@ namespace BansheeEngine
 	{
 		VertexDataDescPtr vertexDesc = vertexLayoutVertexDesc(layout);
 
-		mMeshData = bs_shared_ptr<MeshData>(numVertices, numIndices, vertexDesc, indexType);
+		mMeshData = bs_shared_ptr_new<MeshData>(numVertices, numIndices, vertexDesc, indexType);
 	}
 
 	RendererMeshData::RendererMeshData(const MeshDataPtr& meshData)

+ 1 - 1
BansheeCore/Source/BsResource.cpp

@@ -10,7 +10,7 @@ namespace BansheeEngine
 	Resource::Resource(bool initializeOnRenderThread)
 		:CoreObject(initializeOnRenderThread), mSize(0)
 	{ 
-		mMetaData = bs_shared_ptr<ResourceMetaData>();
+		mMetaData = bs_shared_ptr_new<ResourceMetaData>();
 	}
 
 	const WString& Resource::getName() const 

+ 2 - 2
BansheeCore/Source/BsResourceManifest.cpp

@@ -18,12 +18,12 @@ namespace BansheeEngine
 
 	ResourceManifestPtr ResourceManifest::create(const String& name)
 	{
-		return bs_shared_ptr<ResourceManifest>(name);
+		return bs_shared_ptr_new<ResourceManifest>(name);
 	}
 
 	ResourceManifestPtr ResourceManifest::createEmpty()
 	{
-		return bs_shared_ptr<ResourceManifest>(ConstructPrivately());
+		return bs_shared_ptr_new<ResourceManifest>(ConstructPrivately());
 	}
 
 	void ResourceManifest::registerResource(const String& uuid, const Path& filePath)

+ 1 - 1
BansheeCore/Source/BsResources.cpp

@@ -290,7 +290,7 @@ namespace BansheeEngine
 		for (UINT32 i = 0; i < (UINT32)dependencyList.size(); i++)
 			dependencyUUIDs[i] = dependencyList[i].resource.getUUID();
 
-		SPtr<SavedResourceData> resourceData = bs_shared_ptr<SavedResourceData>(dependencyUUIDs, resource->allowAsyncLoading());
+		SPtr<SavedResourceData> resourceData = bs_shared_ptr_new<SavedResourceData>(dependencyUUIDs, resource->allowAsyncLoading());
 
 		FileEncoder fs(filePath);
 		fs.encode(resourceData.get());

+ 2 - 2
BansheeCore/Source/BsSceneObject.cpp

@@ -43,8 +43,8 @@ namespace BansheeEngine
 
 	HSceneObject SceneObject::createInternal(const String& name, UINT32 flags)
 	{
-		std::shared_ptr<SceneObject> sceneObjectPtr = std::shared_ptr<SceneObject>(new (bs_alloc<SceneObject, PoolAlloc>()) SceneObject(name, flags), 
-			&bs_delete<PoolAlloc, SceneObject>, StdAlloc<SceneObject, PoolAlloc>());
+		std::shared_ptr<SceneObject> sceneObjectPtr = std::shared_ptr<SceneObject>(new (bs_alloc<SceneObject>()) SceneObject(name, flags), 
+			&bs_delete<SceneObject>, StdAlloc<SceneObject>());
 		
 		HSceneObject sceneObject = GameObjectManager::instance().registerObject(sceneObjectPtr);
 		sceneObject->mThisHandle = sceneObject;

+ 5 - 5
BansheeCore/Source/BsShader.cpp

@@ -309,7 +309,7 @@ namespace BansheeEngine
 	SPtr<ShaderCore> ShaderCore::create(const String& name, const SHADER_DESC_CORE& desc, const Vector<SPtr<TechniqueCore>>& techniques)
 	{
 		ShaderCore* shaderCore = new (bs_alloc<ShaderCore>()) ShaderCore(name, desc, techniques);
-		SPtr<ShaderCore> shaderCorePtr = bs_shared_ptr<ShaderCore, GenAlloc>(shaderCore);
+		SPtr<ShaderCore> shaderCorePtr = bs_shared_ptr<ShaderCore>(shaderCore);
 		shaderCorePtr->_setThisPtr(shaderCorePtr);
 		shaderCorePtr->initialize();
 
@@ -319,7 +319,7 @@ namespace BansheeEngine
 	Shader::Shader(const String& name, const SHADER_DESC& desc, const Vector<SPtr<Technique>>& techniques)
 		:TShader(name, desc, techniques)
 	{
-		mMetaData = bs_shared_ptr<ShaderMetaData>();
+		mMetaData = bs_shared_ptr_new<ShaderMetaData>();
 	}
 
 	SPtr<ShaderCore> Shader::getCore() const
@@ -340,7 +340,7 @@ namespace BansheeEngine
 			techniques.push_back(technique->getCore());
 
 		ShaderCore* shaderCore = new (bs_alloc<ShaderCore>()) ShaderCore(mName, convertDesc(mDesc), techniques);
-		SPtr<ShaderCore> shaderCorePtr = bs_shared_ptr<ShaderCore, GenAlloc>(shaderCore);
+		SPtr<ShaderCore> shaderCorePtr = bs_shared_ptr<ShaderCore>(shaderCore);
 		shaderCorePtr->_setThisPtr(shaderCorePtr);
 
 		return shaderCorePtr;
@@ -468,7 +468,7 @@ namespace BansheeEngine
 
 	ShaderPtr Shader::_createPtr(const String& name, const SHADER_DESC& desc, const Vector<SPtr<Technique>>& techniques)
 	{
-		ShaderPtr newShader = bs_core_ptr<Shader, PoolAlloc>(new (bs_alloc<Shader, PoolAlloc>()) Shader(name, desc, techniques));
+		ShaderPtr newShader = bs_core_ptr<Shader>(new (bs_alloc<Shader>()) Shader(name, desc, techniques));
 		newShader->_setThisPtr(newShader);
 		newShader->initialize();
 
@@ -477,7 +477,7 @@ namespace BansheeEngine
 
 	ShaderPtr Shader::createEmpty()
 	{
-		ShaderPtr newShader = bs_core_ptr<Shader, PoolAlloc>(new (bs_alloc<Shader, PoolAlloc>()) Shader());
+		ShaderPtr newShader = bs_core_ptr<Shader>(new (bs_alloc<Shader>()) Shader());
 		newShader->_setThisPtr(newShader);
 
 		return newShader;

+ 2 - 2
BansheeCore/Source/BsShaderInclude.cpp

@@ -17,8 +17,8 @@ namespace BansheeEngine
 
 	ShaderIncludePtr ShaderInclude::_createPtr(const String& includeString)
 	{
-		ShaderIncludePtr shaderIncludePtr = bs_core_ptr<ShaderInclude, PoolAlloc>(
-			new (bs_alloc<ShaderInclude, PoolAlloc>()) ShaderInclude(includeString));
+		ShaderIncludePtr shaderIncludePtr = bs_core_ptr<ShaderInclude>(
+			new (bs_alloc<ShaderInclude>()) ShaderInclude(includeString));
 		shaderIncludePtr->_setThisPtr(shaderIncludePtr);
 		shaderIncludePtr->initialize();
 

+ 1 - 1
BansheeCore/Source/BsSpecificImporter.cpp

@@ -6,7 +6,7 @@ namespace BansheeEngine
 {
 	ImportOptionsPtr SpecificImporter::createImportOptions() const
 	{
-		return bs_shared_ptr<ImportOptions, PoolAlloc>();
+		return bs_shared_ptr_new<ImportOptions>();
 	}
 
 	ConstImportOptionsPtr SpecificImporter::getDefaultImportOptions() const

+ 3 - 3
BansheeCore/Source/BsStringTable.cpp

@@ -194,7 +194,7 @@ namespace BansheeEngine
 		SPtr<LocalizedStringData> stringData;
 		if(iterFind == curLanguage->strings.end())
 		{
-			stringData = bs_shared_ptr<LocalizedStringData>();
+			stringData = bs_shared_ptr_new<LocalizedStringData>();
 			curLanguage->strings[identifier] = stringData;
 		}
 		else
@@ -263,8 +263,8 @@ namespace BansheeEngine
 
 	SPtr<StringTable> StringTable::_createPtr()
 	{
-		SPtr<StringTable> scriptCodePtr = bs_core_ptr<StringTable, PoolAlloc>(
-			new (bs_alloc<StringTable, PoolAlloc>()) StringTable());
+		SPtr<StringTable> scriptCodePtr = bs_core_ptr<StringTable>(
+			new (bs_alloc<StringTable>()) StringTable());
 		scriptCodePtr->_setThisPtr(scriptCodePtr);
 		scriptCodePtr->initialize();
 

+ 4 - 4
BansheeCore/Source/BsTechnique.cpp

@@ -57,7 +57,7 @@ namespace BansheeEngine
 	SPtr<TechniqueCore> TechniqueCore::create(const StringID& renderAPI, const StringID& renderer, const Vector<SPtr<PassCore>>& passes)
 	{
 		TechniqueCore* technique = new (bs_alloc<TechniqueCore>()) TechniqueCore(renderAPI, renderer, passes);
-		SPtr<TechniqueCore> techniquePtr = bs_shared_ptr<TechniqueCore, GenAlloc>(technique);
+		SPtr<TechniqueCore> techniquePtr = bs_shared_ptr<TechniqueCore>(technique);
 		techniquePtr->_setThisPtr(techniquePtr);
 		techniquePtr->initialize();
 
@@ -84,7 +84,7 @@ namespace BansheeEngine
 			passes.push_back(pass->getCore());
 
 		TechniqueCore* technique = new (bs_alloc<TechniqueCore>()) TechniqueCore(mRenderAPI, mRenderer, passes);
-		SPtr<TechniqueCore> techniquePtr = bs_shared_ptr<TechniqueCore, GenAlloc>(technique);
+		SPtr<TechniqueCore> techniquePtr = bs_shared_ptr<TechniqueCore>(technique);
 		techniquePtr->_setThisPtr(techniquePtr);
 
 		return techniquePtr;
@@ -99,7 +99,7 @@ namespace BansheeEngine
 	TechniquePtr Technique::create(const StringID& renderAPI, const StringID& renderer, const Vector<SPtr<Pass>>& passes)
 	{
 		Technique* technique = new (bs_alloc<Technique>()) Technique(renderAPI, renderer, passes);
-		TechniquePtr techniquePtr = bs_core_ptr<Technique, GenAlloc>(technique);
+		TechniquePtr techniquePtr = bs_core_ptr<Technique>(technique);
 		techniquePtr->_setThisPtr(techniquePtr);
 		techniquePtr->initialize();
 
@@ -109,7 +109,7 @@ namespace BansheeEngine
 	TechniquePtr Technique::createEmpty()
 	{
 		Technique* technique = new (bs_alloc<Technique>()) Technique();
-		TechniquePtr techniquePtr = bs_core_ptr<Technique, GenAlloc>(technique);
+		TechniquePtr techniquePtr = bs_core_ptr<Technique>(technique);
 		techniquePtr->_setThisPtr(techniquePtr);
 
 		return techniquePtr;

+ 5 - 5
BansheeCore/Source/BsTexture.cpp

@@ -73,7 +73,7 @@ namespace BansheeEngine
 			if (depth != 1) depth /= 2;
 		}
 
-		PixelDataPtr dst = bs_shared_ptr<PixelData, PoolAlloc>(width, height, depth, getFormat());
+		PixelDataPtr dst = bs_shared_ptr_new<PixelData>(width, height, depth, getFormat());
 
 		dst->allocateInternalBuffer();
 
@@ -210,7 +210,7 @@ namespace BansheeEngine
 
 	TextureViewPtr TextureCore::createView(const SPtr<TextureCore>& texture, const TEXTURE_VIEW_DESC& desc)
 	{
-		return bs_shared_ptr<TextureView, PoolAlloc>(new (bs_alloc<TextureView, PoolAlloc>()) TextureView(texture, desc));
+		return bs_shared_ptr<TextureView>(new (bs_alloc<TextureView>()) TextureView(texture, desc));
 	}
 
 	void TextureCore::clearBufferViews()
@@ -235,7 +235,7 @@ namespace BansheeEngine
 		if (iterFind == texture->mTextureViews.end())
 		{
 			TextureViewPtr newView = texture->createView(texture, key);
-			texture->mTextureViews[key] = new (bs_alloc<TextureViewReference, PoolAlloc>()) TextureViewReference(newView);
+			texture->mTextureViews[key] = new (bs_alloc<TextureViewReference>()) TextureViewReference(newView);
 
 			iterFind = texture->mTextureViews.find(key);
 		}
@@ -266,7 +266,7 @@ namespace BansheeEngine
 
 			texture->mTextureViews.erase(iterFind);
 
-			bs_delete<PoolAlloc>(toRemove);
+			bs_delete(toRemove);
 		}
 	}
 
@@ -431,7 +431,7 @@ namespace BansheeEngine
 			{
 				UINT32 subresourceIdx = mProperties.mapToSubresourceIdx(i, j);
 
-				mCPUSubresourceData[subresourceIdx] = bs_shared_ptr<PixelData>(curWidth, curHeight, curDepth, mProperties.getFormat());
+				mCPUSubresourceData[subresourceIdx] = bs_shared_ptr_new<PixelData>(curWidth, curHeight, curDepth, mProperties.getFormat());
 				mCPUSubresourceData[subresourceIdx]->allocateInternalBuffer();
 
 				if (curWidth > 1)

+ 2 - 2
BansheeCore/Source/BsTextureManager.cpp

@@ -10,7 +10,7 @@ namespace BansheeEngine
         PixelFormat format, int usage, bool hwGamma, UINT32 multisampleCount)
     {
 		Texture* tex = new (bs_alloc<Texture>()) Texture(texType, width, height, depth, numMipmaps, format, usage, hwGamma, multisampleCount);
-		TexturePtr ret = bs_core_ptr<Texture, GenAlloc>(tex);
+		TexturePtr ret = bs_core_ptr<Texture>(tex);
 
 		ret->_setThisPtr(ret);
 		ret->initialize();
@@ -21,7 +21,7 @@ namespace BansheeEngine
 	TexturePtr TextureManager::_createEmpty()
 	{
 		Texture* tex = new (bs_alloc<Texture>()) Texture();
-		TexturePtr texture = bs_core_ptr<Texture, GenAlloc>(tex);
+		TexturePtr texture = bs_core_ptr<Texture>(tex);
 		texture->_setThisPtr(texture);
 
 		return texture;

+ 1 - 1
BansheeCore/Source/BsTransientMesh.cpp

@@ -63,7 +63,7 @@ namespace BansheeEngine
 		TransientMeshCore* core = new (bs_alloc<TransientMeshCore>()) TransientMeshCore(
 			mParentHeap->getCore(), mId, mProperties.mNumVertices, mProperties.mNumIndices, mProperties.mSubMeshes);
 
-		SPtr<CoreObjectCore> meshCore = bs_shared_ptr<TransientMeshCore, GenAlloc>(core);
+		SPtr<CoreObjectCore> meshCore = bs_shared_ptr<TransientMeshCore>(core);
 		meshCore->_setThisPtr(meshCore);
 
 		return meshCore;

+ 3 - 3
BansheeCore/Source/BsVertexDataDesc.cpp

@@ -32,7 +32,7 @@ namespace BansheeEngine
 		UINT32 maxStreamIdx = getMaxStreamIdx();
 
 		UINT32 numStreams = maxStreamIdx + 1;
-		UINT32* streamOffsets = bs_newN<UINT32, ScratchAlloc>(numStreams);
+		UINT32* streamOffsets = bs_newN<UINT32>(numStreams);
 		for (UINT32 i = 0; i < numStreams; i++)
 			streamOffsets[i] = 0;
 
@@ -47,7 +47,7 @@ namespace BansheeEngine
 			streamOffsets[streamIdx] += vertElem.getSize();
 		}
 
-		bs_deleteN<ScratchAlloc>(streamOffsets, numStreams);
+		bs_deleteN(streamOffsets, numStreams);
 
 		return declarationElements;
 	}
@@ -176,7 +176,7 @@ namespace BansheeEngine
 
 	VertexDataDescPtr VertexDataDesc::create()
 	{
-		return bs_shared_ptr<VertexDataDesc>();
+		return bs_shared_ptr_new<VertexDataDesc>();
 	}
 
 	/************************************************************************/

+ 4 - 4
BansheeCore/Source/BsViewport.cpp

@@ -89,7 +89,7 @@ namespace BansheeEngine
 	{
 		ViewportCore* viewport = new (bs_alloc<Viewport>()) ViewportCore(target, x, y, width, height);
 
-		SPtr<ViewportCore> viewportPtr = bs_shared_ptr<ViewportCore, GenAlloc>(viewport);
+		SPtr<ViewportCore> viewportPtr = bs_shared_ptr<ViewportCore>(viewport);
 		viewportPtr->_setThisPtr(viewportPtr);
 		viewportPtr->initialize();
 
@@ -162,7 +162,7 @@ namespace BansheeEngine
 		ViewportCore* viewport = new (bs_alloc<Viewport>()) 
 			ViewportCore(targetCore, mNormArea.x, mNormArea.y, mNormArea.width, mNormArea.height);
 
-		SPtr<ViewportCore> viewportPtr = bs_shared_ptr<ViewportCore, GenAlloc>(viewport);
+		SPtr<ViewportCore> viewportPtr = bs_shared_ptr<ViewportCore>(viewport);
 		viewportPtr->_setThisPtr(viewportPtr);
 
 		return viewportPtr;
@@ -209,7 +209,7 @@ namespace BansheeEngine
 	ViewportPtr Viewport::create(const RenderTargetPtr& target, float x, float y, float width, float height)
 	{
 		Viewport* viewport = new (bs_alloc<Viewport>()) Viewport(target, x, y, width, height);
-		ViewportPtr viewportPtr = bs_core_ptr<Viewport, GenAlloc>(viewport);
+		ViewportPtr viewportPtr = bs_core_ptr<Viewport>(viewport);
 		viewportPtr->_setThisPtr(viewportPtr);
 		viewportPtr->initialize();
 
@@ -219,7 +219,7 @@ namespace BansheeEngine
 	ViewportPtr Viewport::createEmpty()
 	{
 		Viewport* viewport = new (bs_alloc<Viewport>()) Viewport();
-		ViewportPtr viewportPtr = bs_core_ptr<Viewport, GenAlloc>(viewport);
+		ViewportPtr viewportPtr = bs_core_ptr<Viewport>(viewport);
 		viewportPtr->_setThisPtr(viewportPtr);
 
 		return viewportPtr;

+ 8 - 8
BansheeD3D11RenderSystem/Include/BsD3D11GpuBuffer.h

@@ -16,29 +16,29 @@ namespace BansheeEngine
 		/**
 		 * @copydoc GpuBufferCore::lock
 		 */
-		virtual void* lock(UINT32 offset, UINT32 length, GpuLockOptions options);
+		virtual void* lock(UINT32 offset, UINT32 length, GpuLockOptions options) override;
 
 		/**
 		 * @copydoc GpuBufferCore::unlock
 		 */
-		virtual void unlock();
+		virtual void unlock() override;
 
 		/**
 		 * @copydoc GpuBufferCore::readData
 		 */
-        virtual void readData(UINT32 offset, UINT32 length, void* pDest);
+		virtual void readData(UINT32 offset, UINT32 length, void* pDest) override;
 
 		/**
 		 * @copydoc GpuBufferCore::writeData
 		 */
         virtual void writeData(UINT32 offset, UINT32 length, const void* pSource,
-			BufferWriteType writeFlags = BufferWriteType::Normal);
+			BufferWriteType writeFlags = BufferWriteType::Normal) override;
 
 		/**
 		 * @copydoc GpuBufferCore::copyData
 		 */
 		void copyData(GpuBufferCore& srcBuffer, UINT32 srcOffset, 
-			UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false);
+			UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false) override;
 
 		/**
 		 * @brief	Returns the internal DX11 GPU buffer object.
@@ -57,17 +57,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc GpuBufferCore::createView
 		 */
-		virtual GpuBufferView* createView();
+		virtual GpuBufferView* createView() override;
 
 		/**
 		 * @copydoc GpuBufferCore::destroyView
 		 */
-		virtual void destroyView(GpuBufferView* view);
+		virtual void destroyView(GpuBufferView* view) override;
 
 		/**
 		 * @copydoc GpuBufferCore::initialize
 		 */
-		void initialize();	
+		void initialize() override;
 
 	private:
 		D3D11HardwareBuffer* mBuffer;

+ 3 - 3
BansheeD3D11RenderSystem/Include/BsD3D11GpuParamBlockBuffer.h

@@ -17,12 +17,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc GpuParamBlockBufferCore::writeData.
 		 */
-		void writeToGPU(const UINT8* data);
+		void writeToGPU(const UINT8* data) override;
 
 		/**
 		 * @copydoc GpuParamBlockBufferCore::readData.
 		 */
-		void readFromGPU(UINT8* data) const;
+		void readFromGPU(UINT8* data) const override;
 
 		/**
 		 * @brief	Returns internal DX11 buffer object.
@@ -32,7 +32,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc GpuParamBlockBufferCore::initialize
 		 */
-		virtual void initialize();
+		virtual void initialize() override;
 
 	private:
 		D3D11HardwareBuffer* mBuffer;

+ 3 - 3
BansheeD3D11RenderSystem/Include/BsD3D11HLSLProgramFactory.h

@@ -17,19 +17,19 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	GpuProgramFactory::getLanguage
 		 */
-		const String& getLanguage() const;
+		const String& getLanguage() const override;
 
 		/**
 		 * @copydoc	GpuProgramFactory::create(const String&, const String&, GpuProgramType,
 		 *			GpuProgramProfile, bool)
 		 */
 		SPtr<GpuProgramCore> create(const String& source, const String& entryPoint, GpuProgramType gptype, 
-			GpuProgramProfile profile, bool requireAdjacencyInfo);
+			GpuProgramProfile profile, bool requireAdjacencyInfo) override;
 
 		/**
 		* @copydoc	GpuProgramFactory::create(GpuProgramType)
 		*/
-		SPtr<GpuProgramCore> create(GpuProgramType type);
+		SPtr<GpuProgramCore> create(GpuProgramType type) override;
 
 	protected:
 		static const String LANGUAGE_NAME;

+ 5 - 5
BansheeD3D11RenderSystem/Include/BsD3D11HardwareBuffer.h

@@ -36,19 +36,19 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	HardwareBuffer::readData
 		 */
-		void readData(UINT32 offset, UINT32 length, void* pDest);
+		void readData(UINT32 offset, UINT32 length, void* pDest) override;
 
 		/**
 		 * @copydoc	HardwareBuffer::writeData
 		 */
 		void writeData(UINT32 offset, UINT32 length, const void* pSource, 
-			BufferWriteType writeFlags = BufferWriteType::Normal);
+			BufferWriteType writeFlags = BufferWriteType::Normal) override;
 
 		/**
 		 * @copydoc	HardwareBuffer::copyData
 		 */
 		void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, 
-			UINT32 length, bool discardWholeBuffer = false);
+			UINT32 length, bool discardWholeBuffer = false) override;
 
 		/**
 		 * @brief	Returns the internal DX11 buffer object.
@@ -59,12 +59,12 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	HardwareBuffer::lockImpl
 		 */
-		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options);
+		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options) override;
 
 		/**
 		 * @copydoc	HardwareBuffer::unlockImpl
 		 */
-		void unlockImpl();
+		void unlockImpl() override;
 
 		BufferType mBufferType;
 		bool mRandomGpuWrite;

+ 7 - 4
BansheeD3D11RenderSystem/Include/BsD3D11HardwareBufferManager.h

@@ -17,23 +17,26 @@ namespace BansheeEngine
 		/**
 		 * @copydoc HardwareBufferCoreManager::createVertexBufferImpl
 		 */
-		SPtr<VertexBufferCore> createVertexBufferInternal(UINT32 vertexSize, UINT32 numVerts, GpuBufferUsage usage, bool streamOut = false);
+		SPtr<VertexBufferCore> createVertexBufferInternal(UINT32 vertexSize, UINT32 numVerts, 
+			GpuBufferUsage usage, bool streamOut = false) override;
 
 		/**
 		 * @copydoc HardwareBufferCoreManager::createIndexBufferImpl
 		 */
-		SPtr<IndexBufferCore> createIndexBufferInternal(IndexType itype, UINT32 numIndexes, GpuBufferUsage usage);
+		SPtr<IndexBufferCore> createIndexBufferInternal(IndexType itype, UINT32 numIndexes, 
+			GpuBufferUsage usage) override;
 
 		/** 
 		 * @copydoc HardwareBufferCoreManager::createGpuParamBlockBufferInternal 
 		 */
-		SPtr<GpuParamBlockBufferCore> createGpuParamBlockBufferInternal(UINT32 size, GpuParamBlockUsage usage = GPBU_DYNAMIC);
+		SPtr<GpuParamBlockBufferCore> createGpuParamBlockBufferInternal(UINT32 size, 
+			GpuParamBlockUsage usage = GPBU_DYNAMIC) override;
 
 		/**
 		 * @copydoc HardwareBufferCoreManager::createGpuBufferInternal
 		 */
 		SPtr<GpuBufferCore> createGpuBufferInternal(UINT32 elementCount, UINT32 elementSize,
-			GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite = false, bool useCounter = false);
+			GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite = false, bool useCounter = false) override;
 
 		D3D11Device& mDevice;
 	};

+ 6 - 6
BansheeD3D11RenderSystem/Include/BsD3D11IndexBuffer.h

@@ -19,17 +19,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc IndexBufferCore::readData
 		 */
-		void readData(UINT32 offset, UINT32 length, void* pDest);
+		void readData(UINT32 offset, UINT32 length, void* pDest) override;
 
 		/**
 		 * @copydoc IndexBufferCore::writeData
 		 */
-		void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal);
+		void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal) override;
 
 		/**
 		 * @copydoc IndexBufferCore::copyData
 		 */
-		void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false);
+		void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false) override;
 
 		/**
 		 * @brief	Gets the internal DX11 index buffer object.
@@ -40,17 +40,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc IndexBufferCore::lockImpl
 		 */
-		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options);
+		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options) override;
 
 		/**
 		 * @copydoc IndexBufferCore::unlockImpl
 		 */
-		void unlockImpl();
+		void unlockImpl() override;
 
 		/**
 		 * @copydoc IndexBufferCore::initialize
 		 */
-		void initialize();	
+		void initialize() override;
 
 		D3D11HardwareBuffer* mBuffer;
 		D3D11Device& mDevice;

+ 35 - 35
BansheeD3D11RenderSystem/Include/BsD3D11RenderAPI.h

@@ -18,163 +18,163 @@ namespace BansheeEngine
 		/**
 		 * @copydoc RenderAPICore::getName
 		 */
-		const StringID& getName() const;
+		const StringID& getName() const override;
 		
 		/**
 		 * @copydoc RenderAPICore::getShadingLanguageName
 		 */
-		const String& getShadingLanguageName() const;
+		const String& getShadingLanguageName() const override;
 
 		/**
 		 * @copydoc	RenderAPICore::setBlendState
 		 */
-		void setBlendState(const SPtr<BlendStateCore>& blendState);
+		void setBlendState(const SPtr<BlendStateCore>& blendState) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setRasterizerState
 		 */
-		void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState);
+		void setRasterizerState(const SPtr<RasterizerStateCore>& rasterizerState) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setDepthStencilState
 		 */
-		void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue);
+		void setDepthStencilState(const SPtr<DepthStencilStateCore>& depthStencilState, UINT32 stencilRefValue) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setSamplerState
 		 */
-		void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState);
+		void setSamplerState(GpuProgramType gptype, UINT16 texUnit, const SPtr<SamplerStateCore>& samplerState) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setTexture
 		 */
-		void setTexture(GpuProgramType gptype, UINT16 unit, bool enabled, const SPtr<TextureCore>& texPtr);
+		void setTexture(GpuProgramType gptype, UINT16 unit, bool enabled, const SPtr<TextureCore>& texPtr) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setLoadStoreTexture
 		 */
 		void setLoadStoreTexture(GpuProgramType gptype, UINT16 unit, bool enabled, const SPtr<TextureCore>& texPtr,
-			const TextureSurface& surface);
+			const TextureSurface& surface) override;
 
 		/**
 		 * @copydoc	RenderAPICore::disableTextureUnit
 		 */
-		void disableTextureUnit(GpuProgramType gptype, UINT16 texUnit);
+		void disableTextureUnit(GpuProgramType gptype, UINT16 texUnit) override;
 
 		/**
 		 * @copydoc	RenderAPICore::beginFrame
 		 */
-		void beginFrame();
+		void beginFrame() override;
 
 		/**
 		 * @copydoc	RenderAPICore::endFrame
 		 */
-		void endFrame();
+		void endFrame() override;
 
 		/**
 		 * @copydoc RenderAPICore::clearRenderTarget
 		 */
-		void clearRenderTarget(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0);
+		void clearRenderTarget(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0) override;
 
 		/**
 		 * @copydoc RenderAPICore::clearViewport
 		 */
-		void clearViewport(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0);
+		void clearViewport(UINT32 buffers, const Color& color = Color::Black, float depth = 1.0f, UINT16 stencil = 0) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setRenderTarget
 		 */
-		void setRenderTarget(const SPtr<RenderTargetCore>& target);
+		void setRenderTarget(const SPtr<RenderTargetCore>& target) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setViewport
 		 */
-		void setViewport(const Rect2& vp);
+		void setViewport(const Rect2& vp) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setScissorRect
 		 */
-		void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom);
+		void setScissorRect(UINT32 left, UINT32 top, UINT32 right, UINT32 bottom) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setVertexBuffers
 		 */
-		void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers);
+		void setVertexBuffers(UINT32 index, SPtr<VertexBufferCore>* buffers, UINT32 numBuffers) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setIndexBuffer
 		 */
-		void setIndexBuffer(const SPtr<IndexBufferCore>& buffer);
+		void setIndexBuffer(const SPtr<IndexBufferCore>& buffer) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setVertexDeclaration
 		 */
-		void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration);
+		void setVertexDeclaration(const SPtr<VertexDeclarationCore>& vertexDeclaration) override;
 
 		/**
 		 * @copydoc	RenderAPICore::setDrawOperation
 		 */
-		void setDrawOperation(DrawOperationType op);
+		void setDrawOperation(DrawOperationType op) override;
 
 		/**
 		 * @copydoc	RenderAPICore::draw
 		 */
-		void draw(UINT32 vertexOffset, UINT32 vertexCount);
+		void draw(UINT32 vertexOffset, UINT32 vertexCount) override;
 
 		/**
 		 * @copydoc	RenderAPICore::drawIndexed
 		 */
-		void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount);
+		void drawIndexed(UINT32 startIndex, UINT32 indexCount, UINT32 vertexOffset, UINT32 vertexCount) override;
 
 		/** 
 		 * @copydoc RenderAPICore::bindGpuProgram
 		 */
-		void bindGpuProgram(const SPtr<GpuProgramCore>& prg);
+		void bindGpuProgram(const SPtr<GpuProgramCore>& prg) override;
 
 		/** 
 		 * @copydoc RenderAPICore::unbindGpuProgram
 		 */
-		void unbindGpuProgram(GpuProgramType gptype);
+		void unbindGpuProgram(GpuProgramType gptype) override;
 
 		/** 
 		 * @copydoc RenderAPICore::setConstantBuffers
 		 */
-		void setConstantBuffers(GpuProgramType gptype, const SPtr<GpuParamsCore>& params);
+		void setConstantBuffers(GpuProgramType gptype, const SPtr<GpuParamsCore>& params) override;
 		
 		/**
 		 * @copydoc	RenderAPICore::setClipPlanesImpl
 		 */
-		void setClipPlanesImpl(const PlaneList& clipPlanes);
+		void setClipPlanesImpl(const PlaneList& clipPlanes) override;
 
 		/**
 		 * @copydoc	RenderAPICore::convertProjectionMatrix
 		 */
-		void convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest);
+		void convertProjectionMatrix(const Matrix4& matrix, Matrix4& dest) override;
 
 		/**
 		 * @copydoc	RenderAPICore::getColorVertexElementType
 		 */
-		VertexElementType getColorVertexElementType() const;
+		VertexElementType getColorVertexElementType() const override;
 
 		/**
 		 * @copydoc	RenderAPICore::getHorizontalTexelOffset
 		 */
-		float getHorizontalTexelOffset();
+		float getHorizontalTexelOffset() override;
 
 		/**
 		 * @copydoc	RenderAPICore::getVerticalTexelOffset
 		 */
-		float getVerticalTexelOffset();
+		float getVerticalTexelOffset() override;
 
 		/**
 		 * @copydoc	RenderAPICore::getMinimumDepthInputValue
 		 */
-		float getMinimumDepthInputValue();
+		float getMinimumDepthInputValue() override;
 
 		/**
 		 * @copydoc	RenderAPICore::getMaximumDepthInputValue
 		 */
-		float getMaximumDepthInputValue();
+		float getMaximumDepthInputValue() override;
 
 		/************************************************************************/
 		/* 				Internal use by DX11 RenderSystem only                  */
@@ -210,17 +210,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	RenderAPICore::initializePrepare
 		 */
-		void initializePrepare();
+		void initializePrepare() override;
 
 		/**
 		 * @copydoc	RenderAPICore::initializeFinalize
 		 */
-		void initializeFinalize(const SPtr<RenderWindowCore>& primaryWindow);
+		void initializeFinalize(const SPtr<RenderWindowCore>& primaryWindow) override;
 
 		/**
 		 * @copydoc	RenderAPICore::destroy_internal
 		 */
-        void destroyCore();
+		void destroyCore() override;
 
 		/**
 		 * @brief	Creates or retrieves a proper input layout depending on the currently set vertex shader

+ 1 - 1
BansheeD3D11RenderSystem/Include/BsD3D11RenderAPIFactory.h

@@ -38,7 +38,7 @@ namespace BansheeEngine
 				static RenderAPIFactoryPtr newFactory;
 				if(newFactory == nullptr)
 				{
-					newFactory = bs_shared_ptr<D3D11RenderAPIFactory>();
+					newFactory = bs_shared_ptr_new<D3D11RenderAPIFactory>();
 					RenderAPIManager::instance().registerFactory(newFactory);
 				}
 			}

+ 4 - 4
BansheeD3D11RenderSystem/Include/BsD3D11RenderStateManager.h

@@ -14,21 +14,21 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	RenderStateCoreManager::createSamplerStateInternal
 		 */
-		virtual SPtr<SamplerStateCore> createSamplerStateInternal(const SAMPLER_STATE_DESC& desc) const;
+		virtual SPtr<SamplerStateCore> createSamplerStateInternal(const SAMPLER_STATE_DESC& desc) const override;
 
 		/**
 		 * @copydoc	RenderStateCoreManager::createBlendStateInternal
 		 */
-		virtual SPtr<BlendStateCore> createBlendStateInternal(const BLEND_STATE_DESC& desc) const;
+		virtual SPtr<BlendStateCore> createBlendStateInternal(const BLEND_STATE_DESC& desc) const override;
 
 		/**
 		 * @copydoc	RenderStateCoreManager::createRasterizerStateInternal
 		 */
-		virtual SPtr<RasterizerStateCore> createRasterizerStateInternal(const RASTERIZER_STATE_DESC& desc) const;
+		virtual SPtr<RasterizerStateCore> createRasterizerStateInternal(const RASTERIZER_STATE_DESC& desc) const override;
 
 		/**
 		 * @copydoc	RenderStateCoreManager::createDepthStencilStateInternal
 		 */
-		virtual SPtr<DepthStencilStateCore> createDepthStencilStateInternal(const DEPTH_STENCIL_STATE_DESC& desc) const;
+		virtual SPtr<DepthStencilStateCore> createDepthStencilStateInternal(const DEPTH_STENCIL_STATE_DESC& desc) const override;
 	};
 }

+ 2 - 2
BansheeD3D11RenderSystem/Include/BsD3D11RenderWindowManager.h

@@ -17,7 +17,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc RenderWindowManager::createImpl
 		 */
-		RenderWindowPtr createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const RenderWindowPtr& parentWindow);
+		RenderWindowPtr createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const RenderWindowPtr& parentWindow) override;
 
 	private:
 		D3D11RenderAPI* mRenderSystem;
@@ -35,7 +35,7 @@ namespace BansheeEngine
 		/**
 		 * @copydoc RenderWindowCoreManager::createInternal
 		 */
-		virtual SPtr<RenderWindowCore> createInternal(RENDER_WINDOW_DESC& desc, UINT32 windowId);
+		virtual SPtr<RenderWindowCore> createInternal(RENDER_WINDOW_DESC& desc, UINT32 windowId) override;
 
 	private:
 		D3D11RenderAPI* mRenderSystem;

+ 6 - 6
BansheeD3D11RenderSystem/Include/BsD3D11Texture.h

@@ -37,32 +37,32 @@ namespace BansheeEngine
 		/**
 		* @copydoc	CoreObjectCore::initialize()
 		*/
-		void initialize();
+		void initialize() override;
 
 		/**
 		 * @copydoc Texture::lockImpl
 		 */
-		PixelData lockImpl(GpuLockOptions options, UINT32 mipLevel = 0, UINT32 face = 0);
+		PixelData lockImpl(GpuLockOptions options, UINT32 mipLevel = 0, UINT32 face = 0) override;
 
 		/**
 		 * @copydoc Texture::unlockImpl
 		 */
-		void unlockImpl();
+		void unlockImpl() override;
 
 		/**
 		 * @copydoc Texture::copyImpl
 		 */
-		void copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel, const SPtr<TextureCore>& target);
+		void copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel, const SPtr<TextureCore>& target) override;
 
 		/**
 		 * @copydoc Texture::readData
 		 */
-		void readData(PixelData& dest, UINT32 mipLevel = 0, UINT32 face = 0);
+		void readData(PixelData& dest, UINT32 mipLevel = 0, UINT32 face = 0) override;
 
 		/**
 		 * @copydoc Texture::writeData
 		 */
-		void writeData(const PixelData& src, UINT32 mipLevel = 0, UINT32 face = 0, bool discardWholeBuffer = false);
+		void writeData(const PixelData& src, UINT32 mipLevel = 0, UINT32 face = 0, bool discardWholeBuffer = false) override;
 
 		/**
 		 * @brief	Creates a blank DX11 1D texture object.

+ 6 - 6
BansheeD3D11RenderSystem/Include/BsD3D11TextureManager.h

@@ -14,18 +14,18 @@ namespace BansheeEngine
 		/**
 		 * @copydoc	TextureManager::getNativeFormat
 		 */
-		PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma);
+		PixelFormat getNativeFormat(TextureType ttype, PixelFormat format, int usage, bool hwGamma) override;
 
 	protected:		
 		/**
 		 * @copydoc	TextureManager::createRenderTextureImpl
 		 */
-		RenderTexturePtr createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc);
+		RenderTexturePtr createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc) override;
 
 		/**
 		 * @copydoc	TextureManager::createMultiRenderTextureImpl
 		 */
-		MultiRenderTexturePtr createMultiRenderTextureImpl(const MULTI_RENDER_TEXTURE_DESC& desc);
+		MultiRenderTexturePtr createMultiRenderTextureImpl(const MULTI_RENDER_TEXTURE_DESC& desc) override;
 	};
 
 	/**
@@ -39,16 +39,16 @@ namespace BansheeEngine
 		 */
 		SPtr<TextureCore> createTextureInternal(TextureType texType, UINT32 width, UINT32 height, UINT32 depth,
 			int numMips, PixelFormat format, int usage = TU_DEFAULT, bool hwGammaCorrection = false,
-			UINT32 multisampleCount = 0);
+			UINT32 multisampleCount = 0) override;
 
 		/**
 		 * @copydoc	TextureCoreManager::createRenderTextureInternal
 		 */
-		SPtr<RenderTextureCore> createRenderTextureInternal(const RENDER_TEXTURE_CORE_DESC& desc);
+		SPtr<RenderTextureCore> createRenderTextureInternal(const RENDER_TEXTURE_CORE_DESC& desc) override;
 
 		/**
 		 * @copydoc	TextureCoreManager::createMultiRenderTextureInternal
 		 */
-		SPtr<MultiRenderTextureCore> createMultiRenderTextureInternal(const MULTI_RENDER_TEXTURE_CORE_DESC& desc);
+		SPtr<MultiRenderTextureCore> createMultiRenderTextureInternal(const MULTI_RENDER_TEXTURE_CORE_DESC& desc) override;
 	};
 }

+ 6 - 6
BansheeD3D11RenderSystem/Include/BsD3D11VertexBuffer.h

@@ -20,17 +20,17 @@ namespace BansheeEngine
 		/**
 		 * @copydoc VertexBufferCore::readData
 		 */
-		void readData(UINT32 offset, UINT32 length, void* pDest);
+		void readData(UINT32 offset, UINT32 length, void* pDest) override;
 
 		/**
 		 * @copydoc VertexBufferCore::writeData
 		 */
-		void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal);
+		void writeData(UINT32 offset, UINT32 length, const void* pSource, BufferWriteType writeFlags = BufferWriteType::Normal) override;
 
 		/**
 		 * @copydoc VertexBufferCore::copyData
 		 */
-		void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false);
+		void copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset, UINT32 dstOffset, UINT32 length, bool discardWholeBuffer = false) override;
 
 		/**
 		 * @brief	Get the D3D-specific index buffer
@@ -41,17 +41,17 @@ namespace BansheeEngine
 		/**
 		* @copydoc VertexBufferCore::lockImpl
 		 */
-		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options);
+		void* lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options) override;
 
 		/**
 		 * @copydoc VertexBufferCore::unlockImpl
 		 */
-		void unlockImpl(void);
+		void unlockImpl(void) override;
 
 		/**
 		 * @copydoc VertexBufferCore::initialize
 		 */
-		void initialize();
+		void initialize() override;
 
 		D3D11HardwareBuffer* mBuffer;
 		D3D11Device& mDevice;

+ 5 - 5
BansheeD3D11RenderSystem/Source/BsD3D11Driver.cpp

@@ -48,7 +48,7 @@ namespace BansheeEngine
 
 		mNumOutputs = outputIdx;
 
-		mVideoModeInfo = bs_shared_ptr<D3D11VideoModeInfo>(mDXGIAdapter);
+		mVideoModeInfo = bs_shared_ptr_new<D3D11VideoModeInfo>(mDXGIAdapter);
 	}
 
 	D3D11Driver& D3D11Driver::operator=(const D3D11Driver& ob)
@@ -68,26 +68,26 @@ namespace BansheeEngine
 	String D3D11Driver::getDriverName() const
 	{
 		size_t size = wcslen(mAdapterIdentifier.Description);
-		char* str = (char*)bs_alloc<ScratchAlloc>((UINT32)(size + 1));
+		char* str = (char*)bs_alloc((UINT32)(size + 1));
 
 		wcstombs(str, mAdapterIdentifier.Description, size);
 		str[size] = '\0';
 		String Description = str;
 		
-		bs_free<ScratchAlloc>(str);
+		bs_free(str);
 		return String(Description );
 	}
 
 	String D3D11Driver::getDriverDescription() const
 	{
 		size_t size = wcslen(mAdapterIdentifier.Description);
-		char* str = (char*)bs_alloc<ScratchAlloc>((UINT32)(size + 1));
+		char* str = (char*)bs_alloc((UINT32)(size + 1));
 
 		wcstombs(str, mAdapterIdentifier.Description, size);
 		str[size] = '\0';
 		String driverDescription = str;
 
-		bs_free<ScratchAlloc>(str);
+		bs_free(str);
 		StringUtil::trim(driverDescription);
 
 		return driverDescription;

+ 4 - 4
BansheeD3D11RenderSystem/Source/BsD3D11GpuBuffer.cpp

@@ -16,7 +16,7 @@ namespace BansheeEngine
 
 	D3D11GpuBufferCore::~D3D11GpuBufferCore()
 	{ 
-		bs_delete<PoolAlloc>(mBuffer);
+		bs_delete(mBuffer);
 		clearBufferViews();
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_GpuBuffer);
 	}
@@ -46,7 +46,7 @@ namespace BansheeEngine
 			BS_EXCEPT(InvalidParametersException, "Unsupported buffer type " + toString(props.getType()));
 		}
 
-		mBuffer = bs_new<D3D11HardwareBuffer, PoolAlloc>(bufferType, props.getUsage(), props.getElementCount(), props.getElementSize(),
+		mBuffer = bs_new<D3D11HardwareBuffer>(bufferType, props.getUsage(), props.getElementCount(), props.getElementSize(),
 			d3d11rs->getPrimaryDevice(), false, false, props.getRandomGpuWrite(), props.getUseCounter());
 
 		BS_INC_RENDER_STAT_CAT(ResCreated, RenderStatObject_GpuBuffer);
@@ -105,12 +105,12 @@ namespace BansheeEngine
 
 	GpuBufferView* D3D11GpuBufferCore::createView()
 	{
-		return bs_new<D3D11GpuBufferView, PoolAlloc>();
+		return bs_new<D3D11GpuBufferView>();
 	}
 
 	void D3D11GpuBufferCore::destroyView(GpuBufferView* view)
 	{
 		if(view != nullptr)
-			bs_delete<PoolAlloc>(view);
+			bs_delete(view);
 	}
 }

+ 3 - 3
BansheeD3D11RenderSystem/Source/BsD3D11GpuParamBlockBuffer.cpp

@@ -15,7 +15,7 @@ namespace BansheeEngine
 	D3D11GpuParamBlockBufferCore::~D3D11GpuParamBlockBufferCore()
 	{
 		if (mBuffer != nullptr)
-			bs_delete<PoolAlloc>(mBuffer);
+			bs_delete(mBuffer);
 
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_GpuParamBuffer);
 	}
@@ -26,9 +26,9 @@ namespace BansheeEngine
 		D3D11Device& device = d3d11rs->getPrimaryDevice();
 
 		if(mUsage == GPBU_STATIC)
-			mBuffer = bs_new<D3D11HardwareBuffer, PoolAlloc>(D3D11HardwareBuffer::BT_CONSTANT, GBU_STATIC, 1, mSize, std::ref(device));
+			mBuffer = bs_new<D3D11HardwareBuffer>(D3D11HardwareBuffer::BT_CONSTANT, GBU_STATIC, 1, mSize, std::ref(device));
 		else if(mUsage == GPBU_DYNAMIC)
-			mBuffer = bs_new<D3D11HardwareBuffer, PoolAlloc>(D3D11HardwareBuffer::BT_CONSTANT, GBU_DYNAMIC, 1, mSize, std::ref(device));
+			mBuffer = bs_new<D3D11HardwareBuffer>(D3D11HardwareBuffer::BT_CONSTANT, GBU_DYNAMIC, 1, mSize, std::ref(device));
 		else
 			BS_EXCEPT(InternalErrorException, "Invalid gpu param block usage.");
 

+ 10 - 10
BansheeD3D11RenderSystem/Source/BsD3D11HLSLProgramFactory.cpp

@@ -26,23 +26,23 @@ namespace BansheeEngine
 		switch (gptype)
 		{
 		case GPT_VERTEX_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuVertexProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuVertexProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuVertexProgramCore>(new (bs_alloc<D3D11GpuVertexProgramCore>())
 				D3D11GpuVertexProgramCore(source, entryPoint, profile));
 			break;
 		case GPT_FRAGMENT_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuFragmentProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuFragmentProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuFragmentProgramCore>(new (bs_alloc<D3D11GpuFragmentProgramCore>())
 				D3D11GpuFragmentProgramCore(source, entryPoint, profile));
 			break;
 		case GPT_HULL_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuHullProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuHullProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuHullProgramCore>(new (bs_alloc<D3D11GpuHullProgramCore>())
 				D3D11GpuHullProgramCore(source, entryPoint, profile));
 			break;
 		case GPT_DOMAIN_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuDomainProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuDomainProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuDomainProgramCore>(new (bs_alloc<D3D11GpuDomainProgramCore>())
 				D3D11GpuDomainProgramCore(source, entryPoint, profile));
 			break;
 		case GPT_GEOMETRY_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuGeometryProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 				D3D11GpuGeometryProgramCore(source, entryPoint, profile, requireAdjacencyInfo));
 			break;
 		}
@@ -60,23 +60,23 @@ namespace BansheeEngine
 		switch (type)
 		{
 		case GPT_VERTEX_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuVertexProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuVertexProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuVertexProgramCore>(new (bs_alloc<D3D11GpuVertexProgramCore>())
 				D3D11GpuVertexProgramCore("", "", GPP_NONE));
 			break;
 		case GPT_FRAGMENT_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuFragmentProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuFragmentProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuFragmentProgramCore>(new (bs_alloc<D3D11GpuFragmentProgramCore>())
 				D3D11GpuFragmentProgramCore("", "", GPP_NONE));
 			break;
 		case GPT_HULL_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuHullProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuHullProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuHullProgramCore>(new (bs_alloc<D3D11GpuHullProgramCore>())
 				D3D11GpuHullProgramCore("", "", GPP_NONE));
 			break;
 		case GPT_DOMAIN_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuDomainProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuDomainProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuDomainProgramCore>(new (bs_alloc<D3D11GpuDomainProgramCore>())
 				D3D11GpuDomainProgramCore("", "", GPP_NONE));
 			break;
 		case GPT_GEOMETRY_PROGRAM:
-			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore, GenAlloc>(new (bs_alloc<D3D11GpuGeometryProgramCore, GenAlloc>())
+			gpuProg = bs_shared_ptr<D3D11GpuGeometryProgramCore>(new (bs_alloc<D3D11GpuGeometryProgramCore>())
 				D3D11GpuGeometryProgramCore("", "", GPP_NONE, false));
 			break;
 		}

+ 3 - 3
BansheeD3D11RenderSystem/Source/BsD3D11HardwareBuffer.cpp

@@ -87,7 +87,7 @@ namespace BansheeEngine
 		SAFE_RELEASE(mD3DBuffer);
 
 		if(mpTempStagingBuffer != nullptr)
-			bs_delete<PoolAlloc>(mpTempStagingBuffer);
+			bs_delete(mpTempStagingBuffer);
 	}
 
 	void* D3D11HardwareBuffer::lockImpl(UINT32 offset, UINT32 length, GpuLockOptions options)
@@ -179,7 +179,7 @@ namespace BansheeEngine
 			if (!mpTempStagingBuffer)
 			{
 				// Create another buffer instance but use system memory
-				mpTempStagingBuffer = bs_new<D3D11HardwareBuffer, PoolAlloc>(mBufferType, mUsage, 1, mSizeInBytes, std::ref(mDevice), true);
+				mpTempStagingBuffer = bs_new<D3D11HardwareBuffer>(mBufferType, mUsage, 1, mSizeInBytes, std::ref(mDevice), true);
 			}
 
 			// Schedule a copy to the staging
@@ -206,7 +206,7 @@ namespace BansheeEngine
 
 			if(mpTempStagingBuffer != nullptr)
 			{
-				bs_delete<PoolAlloc>(mpTempStagingBuffer);
+				bs_delete(mpTempStagingBuffer);
 				mpTempStagingBuffer = nullptr;
 			}
 		}

+ 6 - 6
BansheeD3D11RenderSystem/Source/BsD3D11HardwareBufferManager.cpp

@@ -14,7 +14,7 @@ namespace BansheeEngine
 	SPtr<VertexBufferCore> D3D11HardwareBufferCoreManager::createVertexBufferInternal(UINT32 vertexSize,
 		UINT32 numVerts, GpuBufferUsage usage, bool streamOut)
 	{
-		SPtr<D3D11VertexBufferCore> ret = bs_shared_ptr<D3D11VertexBufferCore>(mDevice, vertexSize, numVerts, usage, streamOut);
+		SPtr<D3D11VertexBufferCore> ret = bs_shared_ptr_new<D3D11VertexBufferCore>(mDevice, vertexSize, numVerts, usage, streamOut);
 		ret->_setThisPtr(ret);
 
 		return ret;
@@ -23,7 +23,7 @@ namespace BansheeEngine
 	SPtr<IndexBufferCore> D3D11HardwareBufferCoreManager::createIndexBufferInternal(IndexType itype,
 		UINT32 numIndexes, GpuBufferUsage usage)
 	{
-		SPtr<D3D11IndexBufferCore> ret = bs_shared_ptr<D3D11IndexBufferCore>(mDevice, itype, numIndexes, usage);
+		SPtr<D3D11IndexBufferCore> ret = bs_shared_ptr_new<D3D11IndexBufferCore>(mDevice, itype, numIndexes, usage);
 		ret->_setThisPtr(ret);
 
 		return ret;
@@ -31,9 +31,9 @@ namespace BansheeEngine
 
 	SPtr<GpuParamBlockBufferCore> D3D11HardwareBufferCoreManager::createGpuParamBlockBufferInternal(UINT32 size, GpuParamBlockUsage usage)
 	{
-		D3D11GpuParamBlockBufferCore* paramBlockBuffer = new (bs_alloc<D3D11GpuParamBlockBufferCore, GenAlloc>()) D3D11GpuParamBlockBufferCore(size, usage);
+		D3D11GpuParamBlockBufferCore* paramBlockBuffer = new (bs_alloc<D3D11GpuParamBlockBufferCore>()) D3D11GpuParamBlockBufferCore(size, usage);
 
-		SPtr<GpuParamBlockBufferCore> paramBlockBufferPtr = bs_shared_ptr<D3D11GpuParamBlockBufferCore, GenAlloc>(paramBlockBuffer);
+		SPtr<GpuParamBlockBufferCore> paramBlockBufferPtr = bs_shared_ptr<D3D11GpuParamBlockBufferCore>(paramBlockBuffer);
 		paramBlockBufferPtr->_setThisPtr(paramBlockBufferPtr);
 
 		return paramBlockBufferPtr;
@@ -42,9 +42,9 @@ namespace BansheeEngine
 	SPtr<GpuBufferCore> D3D11HardwareBufferCoreManager::createGpuBufferInternal(UINT32 elementCount, UINT32 elementSize,
 		GpuBufferType type, GpuBufferUsage usage, bool randomGpuWrite, bool useCounter)
 	{
-		D3D11GpuBufferCore* buffer = new (bs_alloc<D3D11GpuBufferCore, GenAlloc>()) D3D11GpuBufferCore(elementCount, elementSize, type, usage, randomGpuWrite, useCounter);
+		D3D11GpuBufferCore* buffer = new (bs_alloc<D3D11GpuBufferCore>()) D3D11GpuBufferCore(elementCount, elementSize, type, usage, randomGpuWrite, useCounter);
 
-		SPtr<D3D11GpuBufferCore> bufferPtr = bs_shared_ptr<D3D11GpuBufferCore, GenAlloc>(buffer);
+		SPtr<D3D11GpuBufferCore> bufferPtr = bs_shared_ptr<D3D11GpuBufferCore>(buffer);
 		bufferPtr->_setThisPtr(bufferPtr);
 
 		return bufferPtr;

Some files were not shown because too many files changed in this diff