Fixed memory leak when deleting Effect

This commit is contained in:
Simon Lübeß
2024-08-24 20:09:22 +02:00
parent b98de9835d
commit ad73abd4ea
10 changed files with 139 additions and 176 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ namespace GlitchyEngine.Renderer
public this(StringView name, ConstantBuffer constantBuffer, ShaderVariableType type, uint32 columns, uint32 rows, uint32 offset, uint32 sizeInBytes, uint32 elements, bool isUsed)
{
_name = new String(name);
_constantBuffer = constantBuffer..AddRef();
_constantBuffer = constantBuffer; // Only hold a weak reference. This variable has to die with the buffer
_type = type;
_columns = columns;
_rows = rows;