Make ImU8String not IDisposable

This commit is contained in:
Soreepeong 2025-08-08 21:27:40 +09:00
parent 5fee90085c
commit afe58dae76
15 changed files with 267 additions and 267 deletions

View file

@ -8,7 +8,7 @@ using System.Text.Unicode;
namespace Dalamud.Bindings.ImGui;
[InterpolatedStringHandler]
public ref struct ImU8String : IDisposable
public ref struct ImU8String
{
public const int AllocFreeBufferSize = 512;
private const int MinimumRentSize = AllocFreeBufferSize * 2;
@ -247,7 +247,7 @@ public ref struct ImU8String : IDisposable
this.externalFirstByte = ref Unsafe.NullRef<byte>();
}
public void Dispose()
public void Recycle()
{
if (this.rentedBuffer is { } buf)
{
@ -260,7 +260,7 @@ public ref struct ImU8String : IDisposable
{
if (!this.IsNull)
{
other.Dispose();
other.Recycle();
var res = this;
this = default;
return res;