---
title: "releaseFrame(_:)"
framework: Professional Video Applications
role: symbol
role_heading: Instance Method
platforms: [provideo encoder extensions 1.0.2+]
path: "professional_video_applications/compressormediadecoder/releaseframe(_:)"
---

# releaseFrame(_:)

Release a decoded frame when the encoder extension no longer needs the frame.

## Declaration

```swift
func releaseFrame(_ frame: IOSurface!)
```

## Parameters

- `frame`: The decoded frame to release.

## Discussion

Discussion Use the releaseFrame: method to release a frame that the extension obtains by using the copyFrame: method and to notify the decoder that the encoder extension no longer needs the frame. When you use the Objective-C manual reference-counting implementation, call the releaseFrame: method before the frame release call to insure the releaseFrame: method receives a valid frame.

## See Also

### Getting Decoded Frames and Samples

- [copyAudio(atStart:count:)](professional_video_applications/compressormediadecoder/copyaudio(atstart:count:).md)
- [copyCloseCaptionData(_:frameCount:)](professional_video_applications/compressormediadecoder/copyclosecaptiondata(_:framecount:).md)
- [copyFrame(_:)](professional_video_applications/compressormediadecoder/copyframe(_:).md)
- [CompressorMediaDecoderPtr](professional_video_applications/compressormediadecoderptr.md)
