       localctx->ClearState();       localctx->Flush();        CHECK_REFCOUNT(localdev, 0);        if(!HasMessage(infoQueue, "INFO: Destroy ID0D00Buffer"))       {         failed = true;         TEST_ERROR("Expected buffer, texture and SRV to be destroyed on unbind");       }        localctx->Release();       localctx = NULL;       infoQueue->Release();       infoQueue = NULL;        CHECK_REFCOUNT(localdev, 0);        before = IsICDLoaded();        ret = localdev->Release();        if(ret != 0)       {         failed = true;         TEST_ERROR("localdev still has outstanding references");       }        after = IsICDLoaded();        if(!before)       {         TEST_WARN("Couldn't detect ICD at all - unclear if device really was destroyed");       }       else if(before && after)       {         failed = true;         TEST_ERROR("Device leaked - ICD dll stayed present");       }        ///////////////////////////////////////////////////////////////////////////       