예제 #1
0
static void
ev_attachment_finalize (GObject *object)
{
	EvAttachment *attachment = EV_ATTACHMENT (object);

	if (attachment->priv->name) {
		g_free (attachment->priv->name);
		attachment->priv->name = NULL;
	}

	if (attachment->priv->description) {
		g_free (attachment->priv->description);
		attachment->priv->description = NULL;
	}

	if (attachment->priv->data) {
		g_free (attachment->priv->data);
		attachment->priv->data = NULL;
	}

	if (attachment->priv->mime_type) {
		g_free (attachment->priv->mime_type);
		attachment->priv->mime_type = NULL;
	}

	if (attachment->priv->app) {
		g_object_unref (attachment->priv->app);
		attachment->priv->app = NULL;
	}

	if (attachment->priv->tmp_file) {
		ev_tmp_file_unlink (attachment->priv->tmp_file);
		g_object_unref (attachment->priv->tmp_file);
		attachment->priv->tmp_file = NULL;
	}

	G_OBJECT_CLASS (ev_attachment_parent_class)->finalize (object);
}
예제 #2
0
static void
delete_temp_file (GFile *file)
{
    ev_tmp_file_unlink (file);
    g_object_unref (file);
}