Add deinit to TreeWidget

This commit is contained in:
Sijmen 2020-05-19 23:08:37 +02:00
parent a2600208cd
commit 0569bb5de7
Signed by: vijfhoek
GPG key ID: DAF7821E067D9C48

View file

@ -34,6 +34,8 @@ const Ui = struct {
} }
pub fn deinit(self: *Ui) void { pub fn deinit(self: *Ui) void {
self.treeWidget.deinit();
self.uiFont.deinit(); self.uiFont.deinit();
self.codeFont.deinit(); self.codeFont.deinit();
ttf.quit(); ttf.quit();
@ -70,6 +72,8 @@ const TreeWidget = struct {
return .{}; return .{};
} }
pub fn deinit(self: TreeWidget) void {}
pub fn render(self: TreeWidget, ui: Ui) !void { pub fn render(self: TreeWidget, ui: Ui) !void {
var surface = try ui.uiFont.renderBlended("Hello world", .{ .r = 255, .g = 255, .b = 255 }); var surface = try ui.uiFont.renderBlended("Hello world", .{ .r = 255, .g = 255, .b = 255 });
defer surface.deinit(); defer surface.deinit();