mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +03:00
fix a couple more memory leaks
This commit is contained in:
@ -632,6 +632,7 @@ pub fn destroy(self: *Window) void {
|
||||
|
||||
self.font_group.deinit(self.alloc);
|
||||
self.font_lib.deinit();
|
||||
self.alloc.destroy(self.font_group);
|
||||
|
||||
self.alloc_io_arena.deinit();
|
||||
self.alloc.destroy(self.renderer_state.mutex);
|
||||
|
@ -171,6 +171,11 @@ pub const Set = struct {
|
||||
/// The set of bindings.
|
||||
bindings: HashMap = .{},
|
||||
|
||||
pub fn deinit(self: *Set, alloc: Allocator) void {
|
||||
self.bindings.deinit(alloc);
|
||||
self.* = undefined;
|
||||
}
|
||||
|
||||
/// Add a binding to the set. If the binding already exists then
|
||||
/// this will overwrite it.
|
||||
pub fn put(self: *Set, alloc: Allocator, t: Trigger, action: Action) !void {
|
||||
|
Reference in New Issue
Block a user