Examples: Metal: Wrap main event loop body in an @autoreleasepool block to ensure allocations get freed even if underlying system event loop gets paused due to app nap (#2910, #2917)
This commit is contained in:
parent
8342e5b91a
commit
6d9a54a904
@ -37,6 +37,8 @@ Other Changes:
|
||||
- Misc: Added ImGuiMouseCursor_NotAllowed enum so it can be used by more shared widgets. [@rokups]
|
||||
- Backends: GLFW, SDL, Win32, OSX, Allegro: Added support for ImGuiMouseCursor_NotAllowed. [@rokups]
|
||||
- Backends: GLFW: Added support for the missing mouse cursors newly added in GLFW 3.4+. [@rokups]
|
||||
- Examples: Metal: Wrapped main loop in @autoreleasepool block to ensure allocations get freed
|
||||
even if underlying system event loop gets paused due to app nap (#2910, #2917). [@bear24rw]
|
||||
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
|
@ -81,6 +81,8 @@ int main(int, char**)
|
||||
|
||||
// Main loop
|
||||
while (!glfwWindowShouldClose(window))
|
||||
{
|
||||
@autoreleasepool
|
||||
{
|
||||
// Poll and handle events (inputs, window resize, etc.)
|
||||
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
|
||||
@ -154,6 +156,7 @@ int main(int, char**)
|
||||
[commandBuffer presentDrawable:drawable];
|
||||
[commandBuffer commit];
|
||||
}
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
ImGui_ImplMetal_Shutdown();
|
||||
|
Loading…
x
Reference in New Issue
Block a user