mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Don't try to free CLR memory
This commit is contained in:
parent
1fe2d54128
commit
9bce0d33a6
2 changed files with 2 additions and 6 deletions
|
|
@ -168,7 +168,7 @@ internal class SeStringRenderer : IServiceType
|
||||||
|
|
||||||
// This also does argument validation for drawParams. Do it here.
|
// This also does argument validation for drawParams. Do it here.
|
||||||
// `using var` makes a struct read-only, but we do want to modify it.
|
// `using var` makes a struct read-only, but we do want to modify it.
|
||||||
using var stateStorage = new SeStringDrawState(
|
var stateStorage = new SeStringDrawState(
|
||||||
sss,
|
sss,
|
||||||
drawParams,
|
drawParams,
|
||||||
ThreadSafety.IsMainThread ? this.colorStackSetMainThread : new(this.colorStackSetMainThread.ColorTypes),
|
ThreadSafety.IsMainThread ? this.colorStackSetMainThread : new(this.colorStackSetMainThread.ColorTypes),
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace Dalamud.Interface.ImGuiSeStringRenderer;
|
||||||
|
|
||||||
/// <summary>Calculated values from <see cref="SeStringDrawParams"/> using ImGui styles.</summary>
|
/// <summary>Calculated values from <see cref="SeStringDrawParams"/> using ImGui styles.</summary>
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
public unsafe ref struct SeStringDrawState : IDisposable
|
public unsafe ref struct SeStringDrawState
|
||||||
{
|
{
|
||||||
private static readonly int ChannelCount = Enum.GetValues<SeStringDrawChannel>().Length;
|
private static readonly int ChannelCount = Enum.GetValues<SeStringDrawChannel>().Length;
|
||||||
|
|
||||||
|
|
@ -181,10 +181,6 @@ public unsafe ref struct SeStringDrawState : IDisposable
|
||||||
/// <summary>Gets the text fragments.</summary>
|
/// <summary>Gets the text fragments.</summary>
|
||||||
internal List<TextFragment> Fragments { get; }
|
internal List<TextFragment> Fragments { get; }
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
public void Dispose() =>
|
|
||||||
ImGuiNative.Destroy((ImDrawListSplitter*)Unsafe.AsPointer(ref this.splitter));
|
|
||||||
|
|
||||||
/// <summary>Sets the current channel in the ImGui draw list splitter.</summary>
|
/// <summary>Sets the current channel in the ImGui draw list splitter.</summary>
|
||||||
/// <param name="channelIndex">Channel to switch to.</param>
|
/// <param name="channelIndex">Channel to switch to.</param>
|
||||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue