---
title: CGLayerRelease
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cglayerrelease
---

# CGLayerRelease

Decrements the retain count of a layer object.

## Declaration

```occ
extern void CGLayerRelease(CGLayerRef layer);
```

## Parameters

- `layer`: The layer to release.

## Discussion

Discussion This function is equivalent to calling CFRelease except that it does not crash if the layer parameter is null.

## See Also

### Retaining and Releasing Color Objects

- [CGLayerRetain](coregraphics/cglayerretain.md)
