Skip to content
Snippets Groups Projects
Commit 6cadc760 authored by Nick Schermer's avatar Nick Schermer
Browse files

Unset the list model folder in dispose.

pspecs are already freed in finalize.
parent b3d91bb7
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,7 @@ typedef gint (*ThunarSortFunc) (const ThunarFile *a,
static void thunar_list_model_tree_model_init (GtkTreeModelIface *iface);
static void thunar_list_model_drag_dest_init (GtkTreeDragDestIface *iface);
static void thunar_list_model_sortable_init (GtkTreeSortableIface *iface);
static void thunar_list_model_dispose (GObject *object);
static void thunar_list_model_finalize (GObject *object);
static void thunar_list_model_get_property (GObject *object,
guint prop_id,
......@@ -248,6 +249,7 @@ thunar_list_model_class_init (ThunarListModelClass *klass)
GObjectClass *gobject_class;
gobject_class = G_OBJECT_CLASS (klass);
gobject_class->dispose = thunar_list_model_dispose;
gobject_class->finalize = thunar_list_model_finalize;
gobject_class->get_property = thunar_list_model_get_property;
gobject_class->set_property = thunar_list_model_set_property;
......@@ -415,14 +417,22 @@ thunar_list_model_init (ThunarListModel *store)
static void
thunar_list_model_dispose (GObject *object)
{
/* unlink from the folder (if any) */
thunar_list_model_set_folder (THUNAR_LIST_MODEL (object), NULL);
(*G_OBJECT_CLASS (thunar_list_model_parent_class)->dispose) (object);
}
static void
thunar_list_model_finalize (GObject *object)
{
ThunarListModel *store = THUNAR_LIST_MODEL (object);
/* unlink from the folder (if any) */
thunar_list_model_set_folder (store, NULL);
g_sequence_free (store->rows);
/* disconnect from the file monitor */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment