Skip to content

Commit

Permalink
Cleanup image and mipmap caches after shutting down control system
Browse files Browse the repository at this point in the history
As we now have a lot of things in background jobs related to images and mipmaps
we must keep those systems available until the control system has been fully closed.
  • Loading branch information
jenshannoschwalm committed Dec 14, 2024
1 parent 2a6d4f4 commit 0fb5faa
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/common/darktable.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,12 +2060,6 @@ void dt_cleanup()
// we can no longer call dt_gui_process_events after this point, as that will cause a segfault
// if some delayed event fires

dt_image_cache_cleanup(darktable.image_cache);
free(darktable.image_cache);
darktable.image_cache = NULL;
dt_mipmap_cache_cleanup(darktable.mipmap_cache);
free(darktable.mipmap_cache);
darktable.mipmap_cache = NULL;
if(init_gui)
{
dt_imageio_cleanup(darktable.imageio);
Expand All @@ -2081,6 +2075,13 @@ void dt_cleanup()
darktable.gui = NULL;
}

dt_image_cache_cleanup(darktable.image_cache);
free(darktable.image_cache);
darktable.image_cache = NULL;
dt_mipmap_cache_cleanup(darktable.mipmap_cache);
free(darktable.mipmap_cache);
darktable.mipmap_cache = NULL;

dt_colorspaces_cleanup(darktable.color_profiles);
dt_conf_cleanup(darktable.conf);
free(darktable.conf);
Expand Down

0 comments on commit 0fb5faa

Please sign in to comment.