{mach,examples}: Fix memory leaks (#384)

This commit is contained in:
Ayush 2022-07-03 21:17:47 +05:30 committed by GitHub
parent 39e07df150
commit 858c14bbae
Failed to generate hash of commit
2 changed files with 5 additions and 1 deletions

View file

@ -205,6 +205,9 @@ pub const Platform = struct {
cur.destroy();
}
}
while (platform.events.popFirst()) |ev| {
platform.allocator.destroy(ev);
}
}
fn pushEvent(platform: *Platform, event: structs.Event) void {