Reference counting fixes

This commit is contained in:
Simon Lübeß
2021-02-08 15:25:46 +01:00
parent 2adb138f72
commit 11bc63fb04
3 changed files with 3 additions and 3 deletions
@@ -10,7 +10,7 @@ namespace GlitchyEngine.Renderer
{
internal this(ConstantBuffer constantBuffer, ID3D11ShaderReflectionVariable* variableReflection)
{
_constantBuffer = constantBuffer..AddRef();
_constantBuffer = constantBuffer;
HResult result = variableReflection.GetDescription(let variableDescription);
Log.EngineLogger.Assert(result.Succeeded, scope $"Failed to get variable description. Error({(int)result}): {result}");
@@ -17,7 +17,7 @@ namespace GlitchyEngine.Renderer
{
nativeShaderCode = vertexShader.nativeCode..AddRef();
_context = context;
_context = context..AddRef();
_elements = ownElements;
CreateNativeLayout();
+1 -1
View File
@@ -61,7 +61,7 @@ namespace GlitchyEngine.Renderer
public class BufferVariable
{
private ConstantBuffer _constantBuffer ~ _constantBuffer?.ReleaseRef();
private ConstantBuffer _constantBuffer;
private String _name ~ delete _;