> ## 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.

# XStoreCloseContextHandle

> XStoreCloseContextHandle

# XStoreCloseContextHandle

Closes the specified store context handle.

## Syntax

```cpp theme={null}
void XStoreCloseContextHandle(  
         XStoreContextHandle storeContextHandle  
)  
```

### Parameters

*storeContextHandle*   \_In\_\
Type: XStoreContextHandle

The handle to close.

### Return value

Type: void

## Remarks

This function is safe to call on a time-sensitive thread.

This function closes the **XStoreContextHandle** created by [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext). Store context handles not closed with this function will cause memory leaks. It is best to call this function during cleanup to close all remaining **XStoreConextHandles**. See [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext) for a usage example.

## Requirements

**Header:** XStore.h (included in XGameRuntime.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

[XStore](/reference/system/xstore/xstore_members)\
[XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext)


## Related topics

- [XStoreCreateContext](/reference/system/xstore/functions/xstorecreatecontext.md)
- [XStore](/reference/system/xstore/xstore_members.md)
- [Unity C# API wrappers for the GDK](/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XStoreCloseLicenseHandle](/reference/system/xstore/functions/xstorecloselicensehandle.md)
- [XStoreCloseProductsQueryHandle](/reference/system/xstore/functions/xstorecloseproductsqueryhandle.md)
