mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
Make ImU8String not IDisposable
This commit is contained in:
parent
5fee90085c
commit
afe58dae76
15 changed files with 267 additions and 267 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue