Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt MutableDisposable for most usages of pattern <var>?.dispose(); <var> = undefined #4733

Merged
merged 7 commits into from
Aug 27, 2023

Conversation

Tyriar
Copy link
Member

@Tyriar Tyriar commented Aug 27, 2023

This helps us from making mistakes by registering the clearing of an optional disposable when it's created, instead of having to create and dispose in two separate spots.

This also fixes the following issues:

  • Texture atlases were getting disposed when canvas and webgl renderers were being disposed which could cause issues when they're shared. The disposal of the texture atlas is the duty of CharAtlasCache.removeTerminalFromCache
  • The following weren't being disposed of correctly before:
    • Terminal._accessibilityManager
    • WebglRenderer._rectangleRenderer
    • WebglRenderer._glyphRenderer

@Tyriar Tyriar added this to the 5.3.0 milestone Aug 27, 2023
@Tyriar Tyriar self-assigned this Aug 27, 2023
@Tyriar Tyriar enabled auto-merge August 27, 2023 14:28
@Tyriar Tyriar merged commit abae7b6 into xtermjs:master Aug 27, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant