autoar_extractor_dispose (GObject *object)
{
  AutoarExtractor *self;

  self = AUTOAR_EXTRACTOR (object);

  g_debug ("AutoarExtractor: dispose");

  if (self->istream != NULL) {
    if (!g_input_stream_is_closed (self->istream)) {
      g_input_stream_close (self->istream, self->cancellable, NULL);
    }
    g_object_unref (self->istream);
    self->istream = NULL;
  }

  g_clear_object (&(self->source_file));
  g_clear_object (&(self->output_file));
  g_clear_object (&(self->destination_dir));
  g_clear_object (&(self->cancellable));
  g_clear_object (&(self->prefix));
  g_clear_object (&(self->new_prefix));

  g_list_free_full (self->files_list, g_object_unref);
  self->files_list = NULL;

  if (self->userhash != NULL) {
    g_hash_table_unref (self->userhash);
    self->userhash = NULL;
  }

  if (self->grouphash != NULL) {
    g_hash_table_unref (self->grouphash);
    self->grouphash = NULL;
  }

  if (self->extracted_dir_list != NULL) {
    g_array_unref (self->extracted_dir_list);
    self->extracted_dir_list = NULL;
  }

  G_OBJECT_CLASS (autoar_extractor_parent_class)->dispose (object);
}
autoar_extractor_dispose (GObject *object)
{
  AutoarExtractor *self;

  self = AUTOAR_EXTRACTOR (object);

  g_debug ("AutoarExtractor: dispose");

  if (self->istream != NULL) {
    if (!g_input_stream_is_closed (self->istream)) {
      g_input_stream_close (self->istream, self->cancellable, NULL);
    }
    g_object_unref (self->istream);
    self->istream = NULL;
  }

  g_clear_object (&(self->source_file));
  g_clear_object (&(self->output_file));
  g_clear_object (&(self->destination_dir));
  g_clear_object (&(self->cancellable));
  g_clear_object (&(self->prefix));
  g_clear_object (&(self->new_prefix));

  g_list_free_full (self->files_list, g_object_unref);
  self->files_list = NULL;

  if (self->userhash != NULL) {
    g_hash_table_unref (self->userhash);
    self->userhash = NULL;
  }

  if (self->grouphash != NULL) {
    g_hash_table_unref (self->grouphash);
    self->grouphash = NULL;
  }

  if (self->extracted_dir_list != NULL) {
    g_array_unref (self->extracted_dir_list);
    self->extracted_dir_list = NULL;
  }

  G_OBJECT_CLASS (autoar_extractor_parent_class)->dispose (object);
}