Skip to content

fix: GC hole in MiniAudioDecoder#47

Merged
LSXPrime merged 2 commits intoLSXPrime:masterfrom
Windows10CE:gc-holes
Jun 2, 2025
Merged

fix: GC hole in MiniAudioDecoder#47
LSXPrime merged 2 commits intoLSXPrime:masterfrom
Windows10CE:gc-holes

Conversation

@Windows10CE
Copy link
Contributor

The pointer returned from GetNativeBufferPointer was from an array that was only pinned inside the method, and was free to move outside of that fixed block. Outside of just fixing a GC hole, having it return the array to be pinned as a span allows it to both be much simpler while also not having to worry about management of those arrays in Dispose.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome to SoundFlow repository! We appreciate you taking the time to contribute.

We're excited to review your pull request and look forward to collaborating with you. Please let us know if you have any questions or need any assistance.

Thank you for your contribution!

@Windows10CE
Copy link
Contributor Author

Hopefully this fixes #45, though I cannot know if it will do so.

@LSXPrime
Copy link
Owner

LSXPrime commented Jun 1, 2025

Good evening, and thanks for your contribution.

I'll pull and test it once I'm done with my current feature commit. I'll make sure it's merged before the next package update. Apologies for the delay.

@LSXPrime LSXPrime changed the title Fix GC hole in MiniAudioDecoder fix: GC hole in MiniAudioDecoder Jun 2, 2025
@LSXPrime LSXPrime merged commit b624225 into LSXPrime:master Jun 2, 2025
1 check passed
@LSXPrime
Copy link
Owner

LSXPrime commented Jun 2, 2025

Thanks for your efforts on this, Merged!

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.

2 participants