mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Remove finalizer; cannot be finalized due to the use of GCHandle
This commit is contained in:
parent
683464ed2d
commit
a0b7f53b01
1 changed files with 0 additions and 11 deletions
|
|
@ -59,23 +59,12 @@ internal sealed unsafe class ImGuiClipboardConfig : IServiceType, IDisposable
|
|||
((ImGuiClipboardConfig)GCHandle.FromIntPtr(userData).Target)!.GetClipboardTextImpl();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="ImGuiClipboardConfig"/> class.
|
||||
/// </summary>
|
||||
~ImGuiClipboardConfig() => this.ReleaseUnmanagedResources();
|
||||
|
||||
[SuppressMessage("ReSharper", "AssignNullToNotNullAttribute", Justification = "If it's null, it's crashworthy")]
|
||||
private static ImVectorWrapper<byte> ImGuiCurrentContextClipboardHandlerData =>
|
||||
new((ImVector*)(ImGui.GetCurrentContext() + 0x5520));
|
||||
|
||||
/// <inheritdoc/>
|
||||
public void Dispose()
|
||||
{
|
||||
this.ReleaseUnmanagedResources();
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
private void ReleaseUnmanagedResources()
|
||||
{
|
||||
if (!this.clipboardUserData.IsAllocated)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue