Rename ComPtr.Release for consistency
このコミットが含まれているのは:
1 親
7ed580404a
コミット
352d878f5d
4ファイル変更
+10
-10
検索条件に一致するファイルはありません
@@ -251,7 +251,7 @@ unsafe partial struct PixelShaderEffect
|
||||
unknown.CopyTo(transformMapper.GetAddressOf()).Assert();
|
||||
|
||||
// If there's already an existing manager, release it
|
||||
ComPtr.Release(@this->d2D1TransformMapper);
|
||||
ComPtr.Dispose(@this->d2D1TransformMapper);
|
||||
|
||||
// Store the transform mapper manager into the effect
|
||||
@this->d2D1TransformMapper = transformMapper.Detach();
|
||||
@@ -343,7 +343,7 @@ unsafe partial struct PixelShaderEffect
|
||||
ref ID2D1ResourceTextureManager* currentResourceTextureManager = ref this.resourceTextureManagerBuffer[index];
|
||||
|
||||
// If there's already an existing manager at this index, release it
|
||||
ComPtr.Release(currentResourceTextureManager);
|
||||
ComPtr.Dispose(currentResourceTextureManager);
|
||||
|
||||
// Store the resource texture manager into the buffer
|
||||
currentResourceTextureManager = resourceTextureManager.Detach();
|
||||
|
||||
@@ -231,16 +231,16 @@ internal unsafe partial struct PixelShaderEffect
|
||||
|
||||
NativeMemory.Free(this.constantBuffer);
|
||||
|
||||
ComPtr.Release(this.d2D1TransformMapper);
|
||||
ComPtr.Release(this.d2D1DrawInfo);
|
||||
ComPtr.Release(this.d2D1EffectContext);
|
||||
ComPtr.Dispose(this.d2D1TransformMapper);
|
||||
ComPtr.Dispose(this.d2D1DrawInfo);
|
||||
ComPtr.Dispose(this.d2D1EffectContext);
|
||||
|
||||
// Retrieve all possible resource texture managers in use and release the ones that had been
|
||||
// assigned (from one of the property bindings). We just hardcode 16 here and dont access
|
||||
// the globals, as technically invoking APIs on it might throw an exception.
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
ComPtr.Release(this.resourceTextureManagerBuffer[i]);
|
||||
ComPtr.Dispose(this.resourceTextureManagerBuffer[i]);
|
||||
}
|
||||
|
||||
NativeMemory.Free(Unsafe.AsPointer(ref this));
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ internal unsafe partial struct D2D1ResourceTextureManagerImpl
|
||||
this.d2D1Multithread->Enter();
|
||||
|
||||
// Release the resource too if it has been created
|
||||
ComPtr.Release(this.d2D1ResourceTexture);
|
||||
ComPtr.Dispose(this.d2D1ResourceTexture);
|
||||
|
||||
// Now that the resource, if any, has been released, the effect context can also
|
||||
// be released. This must be done only after any associated resource textures have
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.CompilerServices;
|
||||
using static TerraFX.Interop.Windows.Windows;
|
||||
using static TerraFX.Interop.Windows.S;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace TerraFX.Interop.Windows;
|
||||
|
||||
@@ -19,12 +19,12 @@ namespace TerraFX.Interop.Windows;
|
||||
internal static unsafe class ComPtr
|
||||
{
|
||||
/// <summary>
|
||||
/// Releases a target COM object, if it's not <see langword="null"/>.
|
||||
/// Disposes a target COM object, if it's not <see langword="null"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of COM objects to work with.</typeparam>
|
||||
/// <param name="other">The COM object to potentially release.</param>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static void Release<T>(T* other)
|
||||
public static void Dispose<T>(T* other)
|
||||
where T : unmanaged
|
||||
{
|
||||
if (other is not null)
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする