# RHISwapChain::ShouldClose ```cpp virtual bool ShouldClose() const = 0; ``` 检查交换链是否应该关闭。 **返回:** 如果应该关闭返回 true **示例:** ```cpp while (!swapChain->ShouldClose()) { // 渲染循环 } ``` ## 相关文档 - [RHISwapChain 总览](swap-chain.md) - 返回类总览