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

# XGameRuntimeUninitialize

> XGameRuntimeUninitialize

# XGameRuntimeUninitialize

Gaming Runtime을 초기화 해제합니다.

## 구문

```cpp theme={null}
void XGameRuntimeUninitialize(  
)  
```

### 매개 변수

없음.

### 반환 값

형식: void

## 설명

게임에서 Gaming Runtime 기능을 사용하려면 먼저 [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize) 함수를 호출하여 Gaming Runtime을 초기화합니다. 게임이 Gaming Runtime 사용을 완료하고 종료할 준비가 되면 **XGameRuntimeUninitialize** 함수를 호출하여 Gaming Runtime을 초기화 해제합니다. **XGameRuntimeUninitialize** 함수는 게임이 종료되기 전에 최대한 늦게, 일반적으로 게임의 진입점 함수 내에서 호출합니다.

다음 예제는 Visual Studio의 **Direct3D 12 Desktop Game** 템플릿을 기반으로 하는 게임의 진입점 함수 내에서 [XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize) 및 **XGameRuntimeUninitialize** 함수를 사용하는 방법을 보여 줍니다. **XGameRuntimeInitialize** 함수는 **Game** 개체가 인스턴스화되고 등록되기 전에 호출되며, **XGameRuntimeUninitialize** 함수는 **Game** 개체가 재설정된 후 진입점 함수가 반환되기 전에 호출됩니다.

```cpp theme={null}
// Entry point
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow)
{
    UNREFERENCED_PARAMETER(hPrevInstance);
    UNREFERENCED_PARAMETER(lpCmdLine);

    // Initialize the Gaming Runtime before
    // performing any other activity.
    if (FAILED(XGameRuntimeInitialize()))
        return 1;

    if (!XMVerifyCPUSupport())
        return 1;

    g_game = std::make_unique<Game>();

    // Register class and create window
    {
        // Code omitted for brevity.
        ...
    }

    // Main message loop
    MSG msg = {};
    while (WM_QUIT != msg.message)
    {
        // Code omitted for brevity.
        ...
    }

    g_game.reset();

    // Uninitialize the Gaming Runtime after
    // all other activity has been completed.
    XGameRuntimeUninitialize();

    return (int) msg.wParam;
}
```

## 요구 사항

**헤더:** XGameRuntimeInit.h

**라이브러리:** xgameruntime.lib

**지원 플랫폼:** Windows, XBOX One 계열 콘솔 및 XBOX Series 콘솔

## 개념 문서

* [Microsoft Game Development Kit이란?](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/intro/introduction)

## 함께 보기

[XGameRuntimeInitialize](/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize)
[XGameRuntimeInit](/reference/system/xgameruntimeinit/xgameruntimeinit_members)
[Gaming Runtime을 사용한 새 타이틀 개발](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/pc-dev/overviews/gr-developing-new-titles-on-gamecore)


## Related topics

- [XGameRuntimeInit](/ko/reference/system/xgameruntimeinit/xgameruntimeinit_members.md)
- [XGameRuntimeInitialize](/ko/reference/system/xgameruntimeinit/functions/xgameruntimeinitialize.md)
- [XGameRuntimeInitializeWithOptions](/ko/reference/system/xgameruntimeinit/functions/xgameruntimeinitializewithoptions.md)
- [GDK를 커스텀 C/C++ 엔진에 통합](/ko/build/gdk-and-engines/custom-engine.md)
- [오류 코드](/ko/reference/errorcodes.md)
