Skip to content

Commit

Permalink
SwapMetalBuffers(): release
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Dec 24, 2023
1 parent 767cff7 commit 6de2bd1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/hello_imgui/internal/backend_impls/rendering_metal.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ void SwapMetalBuffers()
[gMetalGlobals.mtlCommandBuffer presentDrawable:gMetalGlobals.caMetalDrawable];
[gMetalGlobals.mtlCommandBuffer commit];

[gMetalGlobals.caMetalDrawable release];
[gMetalGlobals.mtlCommandBuffer release];
[gMetalGlobals.mtlRenderCommandEncoder release];
// Release may be needed: these were created by Metal during this frame
// but not inside an autoreleasepool block
[gMetalGlobals.caMetalDrawable release];
[gMetalGlobals.mtlCommandBuffer release];
[gMetalGlobals.mtlRenderCommandEncoder release];
}

RenderingCallbacksPtr PrepareBackendCallbacksCommon()
Expand Down

0 comments on commit 6de2bd1

Please sign in to comment.