> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XAppCaptureUnRegisterMetadataPurged

> XAppCaptureUnRegisterMetadataPurged

# XAppCaptureUnRegisterMetadataPurged

Remove an event handler for meta data purge events.

## Syntax

```cpp theme={null}
bool XAppCaptureUnRegisterMetadataPurged(  
         XTaskQueueRegistrationToken token,  
         bool wait  
)  
```

### Parameters

*token*   \_In\_\
Type: XTaskQueueRegistrationToken

Event handler token created by [XAppCaptureRegisterMetadataPurged](/reference/system/xappcapture/functions/xappcaptureregistermetadatapurged).

*wait*   \_In\_\
Type: bool

Tells the unregister function to wait in the case that the callback function is running some blocking function.

### Return value

Type: bool

## Remarks

<Note>This function isn't safe to call on a time-sensitive thread. For more information, see [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads).</Note>

Each instance of [XAppCaptureRegisterMetadataPurged](/reference/system/xappcapture/functions/xappcaptureregistermetadatapurged) needs to be followed by an instance of AppCaptureUnRegisterMetadataPurged when the event handler is no longer needed. Failure to remove the handle will result in a memory leak. It is recommended that you call this function after the app has finished capture activity or before the app is shut down.

## Requirements

**Header:** XAppCapture.h

**Library:** xgameruntime.lib

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## Conceptual documentation

* [Time-sensitive threads](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/overviews/threads/time-sensitive-threads)

## See also

[GameDVR Overview](/build/console-features/game-dvr/gamedvr-broadcast)\
[XAppCapture Members](/reference/system/xappcapture/xappcapture_members)\
[XAppCaptureRegisterMetadataPurged](/reference/system/xappcapture/functions/xappcaptureregistermetadatapurged)


## Related topics

- [AppCaptureRegisterMetadataPurged](/reference/system/xappcapture/functions/xappcaptureregistermetadatapurged.md)
- [XAppCapture](/reference/system/xappcapture/xappcapture_members.md)
- [XTaskQueueRegistrationToken](/reference/system/xtaskqueue/structs/xtaskqueueregistrationtoken.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XAppCaptureMetadataPurgedCallback](/reference/system/xappcapture/functions/xappcapturemetadatapurgedcallback.md)
