DXUT에 게임을 개발중인데 디바이스 오류가 뜨는거야.
애러를 추적하니 텍스쳐를 불러들인후 프로그램 종료때 Error가 뜨더라고...
주석처리하면 안뜨고 풀면 뜨고 확실하더라고 텍스쳐를 불러오기전에 Sprite를 생성하고 장치를 소거하는거는 잘되는데...
텍스쳐가 지금 진상이야 이거때문에 지금 2틀을 구글에서 삽질을 했어...
일단 소거를 어디서 하는지 소스는 올릴께

INT WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
{
    // Enable run-time memory check for debug builds.
#if defined(DEBUG) | defined(_DEBUG)
    _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
#endif

    // Set the callback functions
    DXUTSetCallbackD3D9DeviceAcceptable( IsD3D9DeviceAcceptable );
    DXUTSetCallbackD3D9DeviceCreated( OnD3D9CreateDevice );
    DXUTSetCallbackD3D9DeviceReset( OnD3D9ResetDevice );
    DXUTSetCallbackD3D9FrameRender( OnD3D9FrameRender );
    DXUTSetCallbackD3D9DeviceLost( OnD3D9LostDevice );
    DXUTSetCallbackD3D9DeviceDestroyed( OnD3D9DestroyDevice );
    DXUTSetCallbackDeviceChanging( ModifyDeviceSettings );
    DXUTSetCallbackMsgProc( MsgProc );
    DXUTSetCallbackFrameMove( OnFrameMove );

    // TODO: Perform any application-level initialization here

        

    // Initialize DXUT and create the desired Win32 window and Direct3D device for the application
    DXUTInit( true, true ); // Parse the command line and show msgboxes
    DXUTSetHotkeyHandling( true, true, true );  // handle the default hotkeys
    DXUTSetCursorSettings( true, true ); // Show the cursor and clip it when in full screen
    DXUTCreateWindow( L"EmptyProject" );
    DXUTCreateDevice( true, 800, 600 );

    // Start the render loop
    DXUTMainLoop();


    // TODO: Perform any application-level cleanup here
        Destroy();                        // 소거 함수를 여기다가 뒀어

    return DXUTGetExitCode();
}


이 Destroy함수는 extern 선언으로 외부 파일에 정의했고 에러는
 The Direct3D device has a non-zero reference count, meaning some objects were not released
형들 도와줘

ps. 이미지를 윈도우 상에서 뜨는데 정상종료때 저 Error가... (인제 학교에서 집에가니까 댓글을 나중에 볼수 있을꺼야)