clutter/color-manager: Clear default_color_state in finalize
Fixes leak: ==5763== 96 (32 direct, 64 indirect) bytes in 1 blocks are definitely lost in loss record 10,901 of 13,065 ==5763== at 0x4F81D57: g_type_create_instance (gtype.c:1929) ==5763== by 0x4F64ABF: g_object_new_internal.part.0 (gobject.c:2606) ==5763== by 0x4F66ADD: g_object_new_internal (gobject.c:2603) ==5763== by 0x4F66ADD: g_object_new_with_properties (gobject.c:2769) ==5763== by 0x4F67A30: g_object_new (gobject.c:2415) ==5763== by 0x52F7C46: clutter_color_state_new_full (clutter-color-state.c:339) ==5763== by 0x52F7C03: clutter_color_state_new (clutter-color-state.c:312) ==5763== by 0x52F7110: clutter_color_manager_get_default_color_state (clutter-color-manager.c:150) ==5763== by 0x52E7543: get_default_color_state (clutter-actor.c:17836) ==5763== by 0x52E765D: clutter_actor_unset_color_state (clutter-actor.c:17864) ==5763== by 0x52CF056: clutter_actor_constructor (clutter-actor.c:5646) ==5763== by 0x4F64DD3: g_object_new_with_custom_constructor (gobject.c:2524) ==5763== by 0x4F67275: g_object_new_internal (gobject.c:2604) ==5763== by 0x4F67275: g_object_new_valist (gobject.c:2945) Fixes: 2693cac83a5c ("clutter/color-manager: Add a method to get the default color state") Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4149>
This commit is contained in:
parent
2c56c9a1da
commit
57f3e172ca
@ -57,6 +57,8 @@ clutter_color_manager_finalize (GObject *object)
|
||||
{
|
||||
ClutterColorManager *color_manager = CLUTTER_COLOR_MANAGER (object);
|
||||
|
||||
g_clear_object (&color_manager->default_color_state);
|
||||
|
||||
g_clear_pointer (&color_manager->snippet_cache, g_hash_table_unref);
|
||||
|
||||
G_OBJECT_CLASS (clutter_color_manager_parent_class)->finalize (object);
|
||||
|
Loading…
x
Reference in New Issue
Block a user