Does Video Codec SDK destruct object when meeting an error?

The error occurs when decoding multi-streams.
There is something wrong with one of the streams, then I gotCUDA runtime error 1,when I was calling cuvidDecodePicture(hDecoder, pPicParams). This error occurs many times, but I just catch it, print log, and continue running my decoder.
After a while, I got another Error: CUDA runtime error 700.
I just wonder, is there any connection between the two error? For example, the object created by cuvidDecodePictureis not destructed, so that the device memory is not freed.