mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-08-25 00:21:46 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user