Remove unnecessary NativeMemory.Free branches
このコミットが含まれているのは:
1 親
38f1d37d17
コミット
3b31b9abe2
2ファイル変更
+7
-32
検索条件に一致するファイルはありません
@@ -154,10 +154,7 @@ internal unsafe partial struct PixelShaderEffect
|
||||
catch (Exception)
|
||||
{
|
||||
// Free the effect, if we have one
|
||||
if (@this is not null)
|
||||
{
|
||||
NativeMemory.Free(@this);
|
||||
}
|
||||
NativeMemory.Free(@this);
|
||||
|
||||
// Free the handle, if we have one
|
||||
if (globalsHandle.IsAllocated)
|
||||
@@ -244,10 +241,7 @@ internal unsafe partial struct PixelShaderEffect
|
||||
this.globalsHandle.Free();
|
||||
}
|
||||
|
||||
if (this.constantBuffer is not null)
|
||||
{
|
||||
NativeMemory.Free(this.constantBuffer);
|
||||
}
|
||||
NativeMemory.Free(this.constantBuffer);
|
||||
|
||||
if (this.d2D1TransformMapper is not null)
|
||||
{
|
||||
|
||||
+5
-24
@@ -263,30 +263,11 @@ internal unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
_ = this.d2D1Multithread->Release();
|
||||
}
|
||||
|
||||
if (this.resourceId is not null)
|
||||
{
|
||||
NativeMemory.Free(this.resourceId);
|
||||
}
|
||||
|
||||
if (this.resourceTextureProperties.extents is not null)
|
||||
{
|
||||
NativeMemory.Free(this.resourceTextureProperties.extents);
|
||||
}
|
||||
|
||||
if (this.resourceTextureProperties.extendModes is not null)
|
||||
{
|
||||
NativeMemory.Free(this.resourceTextureProperties.extendModes);
|
||||
}
|
||||
|
||||
if (this.data is not null)
|
||||
{
|
||||
NativeMemory.Free(this.data);
|
||||
}
|
||||
|
||||
if (this.strides is not null)
|
||||
{
|
||||
NativeMemory.Free(this.strides);
|
||||
}
|
||||
NativeMemory.Free(this.resourceId);
|
||||
NativeMemory.Free(this.resourceTextureProperties.extents);
|
||||
NativeMemory.Free(this.resourceTextureProperties.extendModes);
|
||||
NativeMemory.Free(this.data);
|
||||
NativeMemory.Free(this.strides);
|
||||
}
|
||||
|
||||
this.lockHandle.Free();
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする