{mach,gpu}: add autorelease pool
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
f366244a9a
commit
68d5f6fcb1
4 changed files with 55 additions and 1 deletions
|
|
@ -142,6 +142,9 @@ const FrameParams = struct {
|
|||
};
|
||||
|
||||
fn frame(params: FrameParams) !void {
|
||||
const pool = try sample_utils.AutoReleasePool.init();
|
||||
defer sample_utils.AutoReleasePool.release(pool);
|
||||
|
||||
try glfw.pollEvents();
|
||||
const pl = params.window.getUserPointer(WindowData).?;
|
||||
if (pl.swap_chain == null or !std.meta.eql(pl.current_desc, pl.target_desc)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue