Skip to content

fix(d3d12): close waitable swap chain handle#104

Open
HopeSuffers wants to merge 1 commit into
renderbag:mainfrom
HopeSuffers:fix/d3d12-waitable-handle-leak
Open

fix(d3d12): close waitable swap chain handle#104
HopeSuffers wants to merge 1 commit into
renderbag:mainfrom
HopeSuffers:fix/d3d12-waitable-handle-leak

Conversation

@HopeSuffers
Copy link
Copy Markdown

Closes rt64/rt64#165

The D3D12 swap chain stores the handle returned by GetFrameLatencyWaitableObject(), but the handle was not closed when the swap chain was destroyed.

Close waitableObject in D3D12SwapChain::~D3D12SwapChain() before releasing the swap chain.

Tested by:

  • Building plume with MSVC/CLion on Windows.
  • Running plume_triangle.
  • Confirming the destructor reaches CloseHandle(waitableObject) with a valid handle (0x6d0).
  • Confirming the handle is reset to NULL and the example exits normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Waitable swap chain must be released in D3D12

1 participant