I'm trying to completely deinitialize the graphical portion of our application and free all related memory, but am having a hard time figuring out what needs to be done to release the references to the ID3D11Device that seem to accumulate on (initializing and) using a decoder.
If I go through the decoder initialization procedure and call ProcessHeader() and DecodeFrameAsync on the header info, and then deinitialize it all (per the Sample Decode example), there are no lingering COM references when I subsequently release the ID3D11Device. If, however, I initialize the decoder and proceed through to a call to DecodeFrameAsync, then immediately afterward deinitialize everything and attempt to release the ID3D11Device, it retains a reference. But only the one reference, no matter how many times DecodeFrameAsync is called (though an additional reference appears for every decoder/decoder session initialized and deinitialized)
I can't find anything much in the docs about Releasing anything other than a couple handle-related items. I've tried reinterpreting the frame output by DecodeFrameAsync as an ID3DTexture2D and calling Release() on that, and not too surprisingly this results in undefined/buggy behavior. Is there anything else I should be doing beyond the deinitialization routines in Sample Decode? Or any other insight you might have?