mirror of
https://gitlab.gnome.org/GNOME/evince
synced 2024-06-30 22:54:23 +00:00
properties: simplify freeing memory by better exploiting glib functions
This commit is contained in:
parent
b477c21c6d
commit
200be9b923
|
@ -97,10 +97,7 @@ ev_properties_view_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
EvPropertiesView *properties = EV_PROPERTIES_VIEW (object);
|
EvPropertiesView *properties = EV_PROPERTIES_VIEW (object);
|
||||||
|
|
||||||
if (properties->uri) {
|
g_clear_pointer (&properties->uri, g_free);
|
||||||
g_free (properties->uri);
|
|
||||||
properties->uri = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (ev_properties_view_parent_class)->dispose (object);
|
G_OBJECT_CLASS (ev_properties_view_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
@ -352,8 +349,7 @@ ev_regular_paper_size (const EvDocumentInfo *info)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_list_foreach (paper_sizes, (GFunc) gtk_paper_size_free, NULL);
|
g_list_free_full (paper_sizes, (GDestroyNotify)gtk_paper_size_free);
|
||||||
g_list_free (paper_sizes);
|
|
||||||
|
|
||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
g_free (exact_size);
|
g_free (exact_size);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user