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:
@ -123,11 +123,7 @@ gimp_canvas_grid_finalize (GObject *object)
|
||||
{
|
||||
GimpCanvasGridPrivate *private = GET_PRIVATE (object);
|
||||
|
||||
if (private->grid)
|
||||
{
|
||||
g_object_unref (private->grid);
|
||||
private->grid = NULL;
|
||||
}
|
||||
g_clear_object (&private->grid);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
|
Reference in New Issue
Block a user