diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2025-04-28 23:50:04 -0400 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2025-04-28 23:50:04 -0400 |
| commit | c183404eea7eb3351f1b6de93b9d0be83f1b41e7 (patch) | |
| tree | d16da32c252d22bf2a64ed8950535806e4b7f325 | |
| parent | 9257256b79efa18a8e329be1d9ee6a1d3c05bbc9 (diff) | |
| download | volute-c183404eea7eb3351f1b6de93b9d0be83f1b41e7.zip | |
free icons
| -rw-r--r-- | main.c | 1 | ||||
| -rw-r--r-- | renderer.c | 7 | ||||
| -rw-r--r-- | renderer.h | 1 |
3 files changed, 9 insertions, 0 deletions
@@ -97,6 +97,7 @@ main(void) { main_loop(&ctx, &ui); free_ui(&ui); + r_free(); return 0; } @@ -108,6 +108,13 @@ r_init(mu_Context *ctx, const char *title) { return 0; } +void +r_free(void) { + while (icon_list.idx-- > 0) { + SDL_FreeSurface(icon_list.items[icon_list.idx]); + } +} + static void print_info(void) { SDL_RendererInfo info; @@ -1,4 +1,5 @@ int r_init(mu_Context *ctx, const char *title); +void r_free(void); void r_input(mu_Context *ctx); void r_render(mu_Context *ctx); void r_get_window_size(int *w, int *h); |