{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
|
|
@ -593,6 +593,11 @@ pub fn main() !void {
|
|||
defer app.deinit(core);
|
||||
|
||||
while (!core.internal.window.shouldClose()) {
|
||||
// On Darwin targets, Dawn requires an NSAutoreleasePool per frame to release
|
||||
// some resources. See Dawn's CHelloWorld example.
|
||||
const pool = try util.AutoReleasePool.init();
|
||||
defer util.AutoReleasePool.release(pool);
|
||||
|
||||
try coreUpdate(core, null);
|
||||
|
||||
try app.update(core);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue