Skip to content

Fix exception when using ALContext after disposing an extension - #2596

Merged
Perksey merged 5 commits into
dotnet:mainfrom
midare160:bugfix/multiple-disposal
Aug 1, 2026
Merged

Fix exception when using ALContext after disposing an extension#2596
Perksey merged 5 commits into
dotnet:mainfrom
midare160:bugfix/multiple-disposal

Conversation

@midare160

@midare160 midare160 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Summary of the PR

  • Fixed an error when disposing an extension retrieved via alc.TryGetExtension<T>() and disposing the parent context itself afterwards
  • Moved the disposal of of the Context-Property from NativeAPIContainer to NativeAPI since disposing any extension left the parent context in a broken state

@midare160

Copy link
Copy Markdown
Contributor Author

@dotnet-policy-service agree

@midare160 midare160 changed the title Fix exception when calling ALContext.Dispose() multiple times Fix exception when using ALContext after disposing an extension Jun 28, 2026
@midare160
midare160 marked this pull request as ready for review June 28, 2026 20:15
@midare160
midare160 requested a review from a team as a code owner June 28, 2026 20:15

@Perksey Perksey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, many thanks!

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in Silk.NET Development Tracker Jul 26, 2026
@Perksey
Perksey enabled auto-merge (squash) July 26, 2026 16:53
@Perksey
Perksey merged commit 3c4d878 into dotnet:main Aug 1, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Silk.NET Development Tracker Aug 1, 2026
@midare160
midare160 deleted the bugfix/multiple-disposal branch August 8, 2026 17:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants