static void psppire_data_window_iface_init (PsppireWindowIface *iface);
static void psppire_data_window_dispose (GObject *object);
+static void psppire_data_window_finalize (GObject *object);
static void psppire_data_window_set_property (GObject *object,
guint prop_id,
const GValue *value,
parent_class = g_type_class_peek_parent (class);
object_class->dispose = psppire_data_window_dispose;
+ object_class->finalize = psppire_data_window_finalize;
object_class->set_property = psppire_data_window_set_property;
object_class->get_property = psppire_data_window_get_property;
{
PsppireDataWindow *dw = PSPPIRE_DATA_WINDOW (object);
- if (dw->dataset)
- {
- struct dataset *dataset = dw->dataset;
- struct session *session = dataset_session (dataset);
-
- dw->dataset = NULL;
-
- dataset_set_callbacks (dataset, NULL, NULL);
- session_set_active_dataset (session, NULL);
- dataset_destroy (dataset);
- }
-
if (dw->builder != NULL)
{
g_object_unref (dw->builder);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
+static void
+psppire_data_window_finalize (GObject *object)
+{
+ PsppireDataWindow *dw = PSPPIRE_DATA_WINDOW (object);
+
+ if (dw->dataset)
+ {
+ struct dataset *dataset = dw->dataset;
+ struct session *session = dataset_session (dataset);
+
+ dw->dataset = NULL;
+
+ dataset_set_callbacks (dataset, NULL, NULL);
+ session_set_active_dataset (session, NULL);
+ dataset_destroy (dataset);
+ }
+
+ if (G_OBJECT_CLASS (parent_class)->finalize)
+ G_OBJECT_CLASS (parent_class)->finalize (object);
+}
+
static void
psppire_data_window_set_property (GObject *object,
guint prop_id,