mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-17 01:06:08 +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_group.deinit(self.alloc);
|
||||||
self.font_lib.deinit();
|
self.font_lib.deinit();
|
||||||
|
self.alloc.destroy(self.font_group);
|
||||||
|
|
||||||
self.alloc_io_arena.deinit();
|
self.alloc_io_arena.deinit();
|
||||||
self.alloc.destroy(self.renderer_state.mutex);
|
self.alloc.destroy(self.renderer_state.mutex);
|
||||||
|
@ -171,6 +171,11 @@ pub const Set = struct {
|
|||||||
/// The set of bindings.
|
/// The set of bindings.
|
||||||
bindings: HashMap = .{},
|
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
|
/// Add a binding to the set. If the binding already exists then
|
||||||
/// this will overwrite it.
|
/// this will overwrite it.
|
||||||
pub fn put(self: *Set, alloc: Allocator, t: Trigger, action: Action) !void {
|
pub fn put(self: *Set, alloc: Allocator, t: Trigger, action: Action) !void {
|
||||||
|
Reference in New Issue
Block a user