gtk: free hotkeys memory on app teardown

Free array list memory in Hotkeys.deinit to avoid DebugAllocator
throwing an error about leaked memory.
This commit is contained in:
Daniel Kinzler
2026-08-10 12:58:46 +02:00
parent 7e463bc65d
commit fd47b15cd4

View File

@@ -82,7 +82,8 @@ pub fn init(alloc: Allocator, app_id: [:0]const u8) Allocator.Error!Hotkeys {
/// Must leave the entries in a valid empty state: clear may still be
/// called after deinit during application teardown.
pub fn deinit(self: *Hotkeys) void {
self.clear();
for (self.entries.items) |*entry| entry.deinit();
self.entries.clearAndFree(self.alloc);
self.alloc.free(self.app_id);
}