mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-15 14:26:09 +00:00
renderer: clarify why SwapChain.defunct is required
This commit is contained in:
@@ -217,6 +217,10 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
|
||||
/// Set to true when deinited, if you try to deinit a defunct
|
||||
/// swap chain it will just be ignored, to prevent double-free.
|
||||
///
|
||||
/// This is required because of `displayUnrealized`, since it
|
||||
/// `deinits` the swapchain, which leads to a double-free if
|
||||
/// the renderer is deinited after that.
|
||||
defunct: bool = false,
|
||||
|
||||
pub fn init(api: GraphicsAPI, custom_shaders: bool) !SwapChain {
|
||||
|
Reference in New Issue
Block a user