From 2a06cf54ba02c9a1dd7289600780fefb258b9bd9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 5 Apr 2024 21:28:50 -0700 Subject: [PATCH] core: App asserts the font grid set is empty on close --- src/App.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/App.zig b/src/App.zig index d9b5e67f2..41a7887b2 100644 --- a/src/App.zig +++ b/src/App.zig @@ -75,7 +75,10 @@ pub fn destroy(self: *App) void { self.surfaces.deinit(self.alloc); // Clean up our font group cache - // TODO(fontmem): assert all ref counts are zero + // We should have zero items in the grid set at this point because + // destroy only gets called when the app is shutting down and this + // should gracefully close all surfaces. + assert(self.font_grid_set.count() == 0); self.font_grid_set.deinit(); self.alloc.destroy(self);