This actually destroys stuff, not merely unreffing. So it belongs in finalize.
static void
psppire_data_store_finalize (GObject *object)
{
+ PsppireDataStore *ds = PSPPIRE_DATA_STORE (object);
+
+ if (ds->datasheet)
+ {
+ datasheet_destroy (ds->datasheet);
+ ds->datasheet = NULL;
+ }
/* must chain up */
(* parent_class->finalize) (object);
if (ds->dispose_has_run)
return;
- if (ds->datasheet)
- {
- datasheet_destroy (ds->datasheet);
- ds->datasheet = NULL;
- }
/* must chain up */
(* parent_class->dispose) (object);