private unsafe void Resize(int newSize) { IntPtr newBuffer = ImGui.IO.MemAlloc(newSize); ImGuiNativeHelper.CopyData((void *)Buffer, (void *)newBuffer, Length); ImGui.IO.MemFree(Buffer); if (newSize > Length) { ImGuiNativeHelper.ClearData((void *)((byte *)Buffer + Length), (uint)newSize - Length); } Buffer = newBuffer; _Length = (uint)newSize; }
public unsafe void ClearData() { ImGuiNativeHelper.ClearData((void *)Buffer, Length); }