app: use a lot of g_clear_object() and g_clear_pointer()
More than 2000 lines of code less in app/, instead of if (instance->member) { g_object_unref/g_free/g_whatever (instance->member); instance->member = NULL; } we now simply use g_clear_object/pointer (&instance->member);
This commit is contained in:
@ -108,11 +108,7 @@ gimp_procedure_action_finalize (GObject *object)
|
||||
{
|
||||
GimpProcedureAction *action = GIMP_PROCEDURE_ACTION (object);
|
||||
|
||||
if (action->procedure)
|
||||
{
|
||||
g_object_unref (action->procedure);
|
||||
action->procedure = NULL;
|
||||
}
|
||||
g_clear_object (&action->procedure);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
Reference in New Issue
Block a user