core: App asserts the font grid set is empty on close

This commit is contained in:
Mitchell Hashimoto
2024-04-05 21:28:50 -07:00
parent 29b172b3ac
commit 2a06cf54ba

View File

@ -75,7 +75,10 @@ pub fn destroy(self: *App) void {
self.surfaces.deinit(self.alloc); self.surfaces.deinit(self.alloc);
// Clean up our font group cache // 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.font_grid_set.deinit();
self.alloc.destroy(self); self.alloc.destroy(self);