<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: 13.1.0 - 13.1.0",
    "macOS: 10.5.0 - 10.14.0"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CAOpenGLLayer/releaseCGLPixelFormat(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CAOpenGLLayer(im)releaseCGLPixelFormat:"
  },
  "title" : "releaseCGLPixelFormat(_:)"
}
-->

# releaseCGLPixelFormat(_:)

Releases the specified OpenGL pixel format object.

```
func releaseCGLPixelFormat(_ pf: CGLPixelFormatObj)
```

## Parameters

`pf`

The pixel format object to release.

## Discussion

This method is called when the OpenGL pixel format that was previously returned by [`copyCGLContext(forPixelFormat:)`](/documentation/QuartzCore/CAOpenGLLayer/copyCGLContext(forPixelFormat:)).

You should not call this method directly, it is intended to be overridden by subclasses.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)