Commit 7c00cf49 authored by Ell's avatar Ell

app: use gimp_async_add_callback_for_object() in various places

Use gimp_async_add_callback_for_object(), added in the previous
commit, instead of gimp_async_add_callback(), in cases where the
destructor of the object owning the async doesn't wait for the
async to finish.  This avoids leaking such ongoing asyncs on
shutdown, during which gimp-parallel either finishes or aborts the
asyncs: if at this point an async has any registered callbacks, an
idle source is added for running the callbacks, extending the
lifetime of the async; however, since we're not getting back into
the main loop, the idle is never run, and the async (and any
associated resources) are never freed.
parent 49fd2847
......@@ -336,9 +336,11 @@ gimp_font_factory_load (GimpFontFactory *factory,
(GimpParallelRunAsyncFunc) gimp_font_factory_load_async,
gimp_async_add_callback (async,
(GimpAsyncCallback) gimp_font_factory_load_async_callback,
gimp_async_add_callback_for_object (
(GimpAsyncCallback) gimp_font_factory_load_async_callback,
gimp_async_set_add (async_set, async);
......@@ -308,9 +308,10 @@ gimp_view_renderer_drawable_render (GimpViewRenderer *renderer,
renderdrawable->priv->render_buf_y = dst_y;
renderdrawable->priv->render_update = FALSE;
gimp_async_add_callback (
gimp_async_add_callback_for_object (
(GimpAsyncCallback) gimp_view_renderer_drawable_render_async_callback,
/* if rendering isn't done yet, update the render-view once it is, and
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment