[gtksourceview] snippetmanager: release bundle on dispose
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] snippetmanager: release bundle on dispose
- Date: Thu, 1 Sep 2022 01:00:03 +0000 (UTC)
commit 157ba8b3a9c456432b8de08af359d770b0975d68
Author: Christian Hergert <chergert redhat com>
Date: Wed Aug 31 17:11:53 2022 -0700
snippetmanager: release bundle on dispose
We don't need to hold onto the bundle until finalize, we already have
protections in place.
gtksourceview/gtksourcesnippetmanager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcesnippetmanager.c b/gtksourceview/gtksourcesnippetmanager.c
index 0305023c..9e07c681 100644
--- a/gtksourceview/gtksourcesnippetmanager.c
+++ b/gtksourceview/gtksourcesnippetmanager.c
@@ -88,6 +88,7 @@ gtk_source_snippet_manager_dispose (GObject *object)
if (self->bundle != NULL)
{
g_object_run_dispose (G_OBJECT (self->bundle));
+ g_clear_object (&self->bundle);
}
G_OBJECT_CLASS (gtk_source_snippet_manager_parent_class)->dispose (object);
@@ -98,7 +99,6 @@ gtk_source_snippet_manager_finalize (GObject *object)
{
GtkSourceSnippetManager *self = GTK_SOURCE_SNIPPET_MANAGER (object);
- g_clear_object (&self->bundle);
g_clear_pointer (&self->search_path, g_strfreev);
g_clear_pointer (&self->strings, g_string_chunk_free);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]