### Function Macro

# Gegl scratch_new0

since: 0.4

#### Declaration [src]

    #define gegl_scratch_new0 (
      type,
      n
    )

#### Description [src]

Allocates `n` elements of type `type` using scratch memory, initialized to 0. The returned pointer is cast to a pointer to the given type. Care is taken to avoid overflow when calculating the size of the allocated block.

Since the returned pointer is already cast to the right type, it is normally unnecessary to cast it explicitly, and doing so might hide memory allocation errors.

Available since: 0.4

This function is not directly available to language bindings.

#### Parameters

`type`

  Type: `-`

  The type of the elements to allocate.

`n`

  Type: `-`

  The number of elements to allocate.