mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Merge branch 'matthiasc/for-main' into 'main'
gsk: Plug a memory leak See merge request GNOME/gtk!4616
This commit is contained in:
commit
a6e47892be
@ -348,7 +348,7 @@ gsk_gl_driver_load_programs (GskGLDriver *self,
|
||||
/* Use XMacros to register all of our programs and their uniforms */
|
||||
#define GSK_GL_NO_UNIFORMS
|
||||
#define GSK_GL_SHADER_RESOURCE(name) \
|
||||
g_bytes_ref(g_resources_lookup_data("/org/gtk/libgsk/gl/" name, 0, NULL))
|
||||
g_resources_lookup_data("/org/gtk/libgsk/gl/" name, 0, NULL)
|
||||
#define GSK_GL_SHADER_STRING(str) \
|
||||
g_bytes_new_static(str, strlen(str))
|
||||
#define GSK_GL_SHADER_SINGLE(bytes) \
|
||||
|
@ -69,11 +69,18 @@ gtk_css_calc_value_new_from_array (GtkCssValue **values,
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
gtk_css_value_number_free (GtkCssValue *value)
|
||||
gtk_css_value_number_free (GtkCssValue *number)
|
||||
{
|
||||
g_slice_free (GtkCssValue, value);
|
||||
if (number->type == TYPE_CALC)
|
||||
{
|
||||
const guint n_terms = number->calc.n_terms;
|
||||
|
||||
for (guint i = 0; i < n_terms; i++)
|
||||
_gtk_css_value_unref (number->calc.terms[i]);
|
||||
}
|
||||
|
||||
g_slice_free (GtkCssValue, number);
|
||||
}
|
||||
|
||||
static double
|
||||
|
Loading…
Reference in New Issue
Block a user