mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimp: properly free resources from the config.
Found by the definitely useful libgimp warnings: > gimp_plug_in_destroy_proxies: ERROR: GimpPattern proxy with ID 13 was refed by plug-in, it MUST NOT do that!
This commit is contained in:
parent
6601e861c4
commit
19a005ad0f
3 changed files with 5 additions and 0 deletions
|
@ -231,6 +231,7 @@ gimp_brush_select_button_get_brush_bitmap (GimpBrushSelectButton *self)
|
|||
result.mask_data = g_bytes_unref_to_data (mask_data, &mask_size);
|
||||
/* Discard any color data, bitmap is B&W i.e. i.e. depth one i.e. a mask */
|
||||
g_bytes_unref (color_data);
|
||||
g_object_unref (brush);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -191,6 +191,8 @@ get_gradient_data (GimpGradientSelectButton *self,
|
|||
*sample_count = n_samples;
|
||||
}
|
||||
|
||||
g_object_unref (gradient);
|
||||
|
||||
/* When result is true, caller must free the array. */
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -235,6 +235,8 @@ gimp_pattern_select_button_get_pattern_image (GimpPatternSelectButton *self)
|
|||
&color_bytes);
|
||||
result.pixelels = g_bytes_unref_to_data (color_bytes, &pixelels_size);
|
||||
|
||||
g_object_unref (pattern);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue