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

[Graphics] Fixes memory leak when creating D3D11 texture with shared options #2568

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

azeno
Copy link
Collaborator

@azeno azeno commented Dec 19, 2024

PR Details

QueryInterface increases the reference count and must be paired with a call to Release.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@Eideren
Copy link
Collaborator

Eideren commented Dec 22, 2024

Do you guys have time to look into this one @arturoc @tebjan ?

@tebjan
Copy link
Member

tebjan commented Dec 26, 2024

This looks correct! Each interface that one gets with QueryInterface needs to be disposed. Even if the underlying native object is the same or should still exist.

@tebjan tebjan merged commit 154dabf into stride3d:master Dec 26, 2024
2 checks passed
@tebjan
Copy link
Member

tebjan commented Dec 26, 2024

Merged, thanks!

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.

3 participants