_com_ptr_t automatic release question

Started by
-1 comments, last by Jacob Jingle 13 years, 9 months ago
I'm having a problem with this not working...
class whatever{public:void whatever(){D3DX11CreateShaderResourceViewFromFile( device, L"whatever.dds", NULL, NULL, &m_pTextureResView, NULL );}_com_ptr_t<_com_IIID<ID3D11ShaderResourceView,&_uuidof(ID3D11ShaderResourceView)>> m_pTextureResView;}


But this does work. Break point shows that the interface is being released early(after first time used in render loop) and I don't know why. Anyone care to explain?

class whatever{public:void whatever(){D3DX11CreateShaderResourceViewFromFile( device, L"whatever.dds", NULL, NULL, &m_pTextureResView, NULL );}ID3D11ShaderResourceView* m_pTextureResView;}


Class is global.

Thx ahead of time,
Jacob Jingle

This topic is closed to new replies.

Advertisement